mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
12 lines
453 B
JavaScript
12 lines
453 B
JavaScript
|
const path = require('path');
|
||
|
const fs = require('fs');
|
||
|
|
||
|
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);
|
||
|
package.version = version;
|
||
|
fs.writeFileSync(path.join(__dirname, '..', 'package.json'), JSON.stringify(package, undefined, 2) + '\n');
|