chore: use unique version for puppeteer@next (#1688)
This patch starts amending package.json with a unique puppeteer@next version so that it gets published on npm.
This commit is contained in:
parent
05f4f943f0
commit
bd73e4b7b8
@ -27,6 +27,7 @@ jobs:
|
||||
env: NODE7=true
|
||||
- node_js: "6.4.0"
|
||||
env: NODE6=true
|
||||
before_deploy: "yarn run apply-next-version"
|
||||
deploy:
|
||||
provider: npm
|
||||
email: aslushnikov@gmail.com
|
||||
|
@ -20,7 +20,8 @@
|
||||
"build": "node utils/node6-transform/index.js",
|
||||
"unit-node6": "node node6/test/test.js",
|
||||
"tsc": "tsc -p .",
|
||||
"prepublishOnly": "npm run build"
|
||||
"prepublishOnly": "npm run build",
|
||||
"apply-next-version": "node utils/apply_next_version.js"
|
||||
},
|
||||
"author": "The Chromium Authors",
|
||||
"license": "Apache-2.0",
|
||||
|
12
utils/apply_next_version.js
Normal file
12
utils/apply_next_version.js
Normal file
@ -0,0 +1,12 @@
|
||||
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');
|
Loading…
Reference in New Issue
Block a user