planetarium / libplanet

Blockchain in C#/.NET for on-chain, decentralized gaming
https://docs.libplanet.io/
GNU Lesser General Public License v2.1
506 stars 141 forks source link

Invalid order of NuGet dev releases #3955

Open moreal opened 4 days ago

moreal commented 4 days ago

Background

When I looked at Libplanet's NuGet dev releases, they were not well ordered by release date.

image

It is because the version suffix is generated without zerofill. (20240901 with zerofill, 202491 without zerofill)

Work items

To resolve this issue, you can amend scripts/determine-versions.js file. You can see the logic to determine a version suffix at the below lines:

https://github.com/planetarium/libplanet/blob/f6cd63d7fcb58870785ed5ce3829327b38ed30f1/scripts/determine-version.js#L120-L126

You should update the part to declare ts variable.

You can test the script easily by running the node scripts/determine-version.js command.

$ node --version
v20.4.0
$ node scripts/determine-version.js 
VersionPrefix: 5.3.0
VersionSuffix: dev.202491004320+f6cd63d
PackageVersion: 5.3.0-dev.202491004320
VersionType: dev

If you amended well, it expects to generate VersionSuffix: dev.20240910010203+xxxxxxx for the date (year: 2024, month: 9, day: 10, hour: 1, minutes: 2, seconds: 3)

uday-rana commented 2 days ago

Hi, I'd like to work on this.

moreal commented 2 days ago

@uday-rana Sure! I just assigned you to this issue.

And we're also running a hackathon right now named Modathon. We'd love for you to check it out 🙏🏻

https://nine-chronicles.dev/event/2024modathon