mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
chore(ci): use TRAVIS_NEXT_NUMBER instead of Date.now()
This commit is contained in:
parent
583f7a07be
commit
d511d7dd99
@ -2,6 +2,12 @@ const path = require('path');
|
|||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const execSync = require('child_process').execSync;
|
const execSync = require('child_process').execSync;
|
||||||
|
|
||||||
|
if (!process.env.TRAVIS_BUILD_NUMBER) {
|
||||||
|
console.log('ERROR: TRAVIS_BUILD_NUMBER is not defined in env!');
|
||||||
|
process.exit(1);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Compare current HEAD to upstream master SHA.
|
// Compare current HEAD to upstream master SHA.
|
||||||
// If they are not equal - refuse to publish since
|
// If they are not equal - refuse to publish since
|
||||||
// we're not tip-of-tree.
|
// we're not tip-of-tree.
|
||||||
@ -19,7 +25,7 @@ let version = package.version;
|
|||||||
const dashIndex = version.indexOf('-');
|
const dashIndex = version.indexOf('-');
|
||||||
if (dashIndex !== -1)
|
if (dashIndex !== -1)
|
||||||
version = version.substring(0, dashIndex);
|
version = version.substring(0, dashIndex);
|
||||||
version += '-next.' + Date.now();
|
version += '-next.' + process.env.TRAVIS_BUILD_NUMBER;
|
||||||
console.log('Setting version to ' + version);
|
console.log('Setting version to ' + version);
|
||||||
|
|
||||||
execSync(`npm --no-git-tag-version version ${version}`);
|
execSync(`npm --no-git-tag-version version ${version}`);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user