@@ -13,15 +13,15 @@ const pkgFilePath = path.join(__dirname, '..', '..', 'package.json');
1313process . env . TZ = 'Etc/UTC' ;
1414
1515/**
16- * FORMAT : M.M.P-dev+ YYYYMMDD.sha.##########
17- * EXAMPLE: 5.6.0-dev+ 20230601.sha.0853c6957c
16+ * FORMAT : M.M.P-dev. YYYYMMDD.sha.##########
17+ * EXAMPLE: 5.6.0-dev. 20230601.sha.0853c6957c
1818 */
1919class NightlyVersion {
2020 /** @param {string } version */
2121 constructor ( version ) {
2222 /** @type {string } */
2323 this . version = version ;
24- const [ , meta ] = this . version . split ( '+ ' ) ;
24+ const [ , meta ] = this . version . split ( 'dev. ' ) ;
2525 const [ dateString , commit ] = meta . split ( '.sha.' ) ;
2626 /** @type {string } */
2727 this . commit = commit ;
@@ -32,7 +32,7 @@ class NightlyVersion {
3232 const { stdout } = await exec ( 'npm show --json mongodb' , { encoding : 'utf8' } ) ;
3333 /** @type {{'dist-tags': {nightly?: string} } } */
3434 const showInfo = JSON . parse ( stdout ) ;
35- const version = showInfo ?. [ 'dist-tags' ] ?. nightly ?? '0.0.0-dev+ YYYYMMDD.sha.##########' ;
35+ const version = showInfo ?. [ 'dist-tags' ] ?. nightly ?? '0.0.0-dev. YYYYMMDD.sha.##########' ;
3636 return new NightlyVersion ( version ) ;
3737 }
3838 static async currentCommit ( ) {
@@ -51,7 +51,7 @@ class NightlyVersion {
5151 const pkg = JSON . parse ( await fs . readFile ( pkgFilePath , { encoding : 'utf8' } ) ) ;
5252
5353 console . log ( 'package.json version is:' , pkg . version ) ;
54- pkg . version = `${ pkg . version } -dev+ ${ yyyymmdd } .sha.${ currentCommit } ` ;
54+ pkg . version = `${ pkg . version } -dev. ${ yyyymmdd } .sha.${ currentCommit } ` ;
5555 console . log ( 'package.json version updated to:' , pkg . version ) ;
5656
5757 await fs . writeFile ( pkgFilePath , JSON . stringify ( pkg , undefined , 2 ) , { encoding : 'utf8' } ) ;
0 commit comments