Skip to content

Commit

Permalink
build: Use shorter special version moniker
Browse files Browse the repository at this point in the history
Some builds fail in the CI because the extra part of the version is limited to 20 chars.
  • Loading branch information
eliandoran committed Nov 2, 2024
1 parent 238c9c6 commit 351219f
Show file tree
Hide file tree
Showing 2 changed files with 202 additions and 202 deletions.
6 changes: 3 additions & 3 deletions bin/update-nightly-version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* user might run into module not found errors or styling errors caused by an old cache.
*
* This script is supposed to be run in the CI, which will update locally the version field of
* `package.json` to contain the date. For example, `0.90.9-beta` will become `0.90.9-nightly-20241102-092832`.
* `package.json` to contain the date. For example, `0.90.9-beta` will become `0.90.9-test-YYMMDD-HHMMSS`.
*
*/

Expand All @@ -22,10 +22,10 @@ function processVersion(version) {
// Add the nightly suffix, plus the date.
const referenceDate = new Date()
.toISOString()
.substring(0, 19)
.substring(2, 19)
.replace(/[-:]*/g, "")
.replace("T", "-");
version = `${version}-nightly-${referenceDate}`;
version = `${version}-test-${referenceDate}`;

return version;
}
Expand Down
Loading

0 comments on commit 351219f

Please sign in to comment.