playwright/utils/apply_next_version.js
2020-03-02 18:17:16 -08:00

13 lines
367 B
JavaScript

const {execSync} = require('child_process');
const package = require('../package.json');
let version = package.version;
const dashIndex = version.indexOf('-');
if (dashIndex !== -1)
version = version.substring(0, dashIndex);
version += '-next.' + Date.now();
console.log('Setting version to ' + version);
execSync(`npm --no-git-tag-version version ${version}`);