Skip to content

Commit 9107f91

Browse files
ci(NODE-5328): change format of nightly versions (#3704)
1 parent b020026 commit 9107f91

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

.github/scripts/nightly.mjs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ const pkgFilePath = path.join(__dirname, '..', '..', 'package.json');
1313
process.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
*/
1919
class 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' });

.github/workflows/release-nightly.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ on:
33
# Timezone is UTC
44
# https://crontab.guru/#0_20_*_*_1-5
55
# At 20:00 on every day-of-week from Monday through Friday.
6-
- cron: '0 20 * * 1-5'
6+
- cron: '35 20 * * 1-5'
77

88
name: release-nightly
99

0 commit comments

Comments
 (0)