Skip to content

Commit

Permalink
Merge pull request #3957 from uday-rana/issue-3955
Browse files Browse the repository at this point in the history
 fix: add zero padding to version timestamp
  • Loading branch information
moreal authored Oct 4, 2024
2 parents 3264f3b + 671a4e5 commit cf42918
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions scripts/determine-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,13 @@ async function main() {
} else {
// Dev
const timestamp = await getCommitTimestamp();
const ts = `${timestamp.getUTCFullYear()}${
timestamp.getUTCMonth() + 1
}${timestamp.getUTCDate()}${timestamp.getUTCHours()}${
timestamp.getUTCMinutes() + 0
}${timestamp.getUTCSeconds()}`;
const ts =
timestamp.getUTCFullYear().toString() +
(timestamp.getUTCMonth() + 1).toString().padStart(2, "0") +
timestamp.getUTCDate().toString().padStart(2, "0") +
timestamp.getUTCHours().toString().padStart(2, "0") +
timestamp.getUTCMinutes().toString().padStart(2, "0") +
timestamp.getUTCSeconds().toString().padStart(2, "0");
versionSuffix = `dev.${ts}`;
packageVersion = `${versionPrefix}-${versionSuffix}`;
versionSuffix += `+${commitHash}`;
Expand Down

0 comments on commit cf42918

Please sign in to comment.