File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 66
77const fs = require ( 'fs' ) ;
88
9+ // Leading `0` aren't valid semver, so we round it up to 10 to
10+ // avoid having to change the nightly version format.
11+ function roundToTen ( value ) {
12+ return value < 10 ? 10 : value ;
13+ }
14+
915function leftPad ( value ) {
1016 return ( value < 10 ? '0' : '' ) + value ;
1117}
@@ -18,7 +24,7 @@ const formattedDate =
1824 leftPad ( date . getUTCMonth ( ) + 1 ) +
1925 leftPad ( date . getUTCDate ( ) ) +
2026 '.' +
21- leftPad ( date . getUTCHours ( ) ) +
27+ leftPad ( roundToTen ( date . getUTCHours ( ) ) ) +
2228 leftPad ( date . getUTCMinutes ( ) ) ;
2329
2430// Remove any existing suffix before appending the date
@@ -30,4 +36,5 @@ fs.writeFileSync(
3036 packageManifestFilename ,
3137 JSON . stringify ( packageManifest , null , 2 ) + '\n'
3238) ;
39+
3340console . log ( 'Updated version number to ' + version ) ;
You can’t perform that action at this time.
0 commit comments