Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid order of NuGet dev releases #3955

Closed
moreal opened this issue Sep 27, 2024 · 2 comments · Fixed by #3957
Closed

Invalid order of NuGet dev releases #3955

moreal opened this issue Sep 27, 2024 · 2 comments · Fixed by #3957
Assignees
Labels
bug Something isn't working ci & cd Related to CI & CD on Azure Pipelines & GitHub Actions good first issue Good for newcomers hacktoberfest Newcomer-welcoming issues for Hacktoberfest packaging Releated to NuGet/npm packages and other formats of distributions

Comments

@moreal
Copy link
Contributor

moreal commented Sep 27, 2024

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:

const timestamp = await getCommitTimestamp();
const ts = `${timestamp.getUTCFullYear()}${
timestamp.getUTCMonth() + 1
}${timestamp.getUTCDate()}${timestamp.getUTCHours()}${
timestamp.getUTCMinutes() + 0
}${timestamp.getUTCSeconds()}`;
versionSuffix = `dev.${ts}`;

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)

@moreal moreal added bug Something isn't working good first issue Good for newcomers ci & cd Related to CI & CD on Azure Pipelines & GitHub Actions packaging Releated to NuGet/npm packages and other formats of distributions labels Sep 27, 2024
@moreal moreal added the hacktoberfest Newcomer-welcoming issues for Hacktoberfest label Sep 27, 2024
@uday-rana
Copy link
Contributor

Hi, I'd like to work on this.

@moreal
Copy link
Contributor Author

moreal commented Sep 29, 2024

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ci & cd Related to CI & CD on Azure Pipelines & GitHub Actions good first issue Good for newcomers hacktoberfest Newcomer-welcoming issues for Hacktoberfest packaging Releated to NuGet/npm packages and other formats of distributions
Projects
2 participants