Open moreal opened 4 days ago
When I looked at Libplanet's NuGet dev releases, they were not well ordered by release date.
It is because the version suffix is generated without zerofill. (20240901 with zerofill, 202491 without zerofill)
20240901
202491
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:
scripts/determine-versions.js
https://github.com/planetarium/libplanet/blob/f6cd63d7fcb58870785ed5ce3829327b38ed30f1/scripts/determine-version.js#L120-L126
You should update the part to declare ts variable.
ts
You can test the script easily by running the node scripts/determine-version.js command.
node scripts/determine-version.js
$ 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)
VersionSuffix: dev.20240910010203+xxxxxxx
Hi, I'd like to work on this.
@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
Background
When I looked at Libplanet's NuGet dev releases, they were not well ordered by release date.
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.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)