зеркало из https://github.com/Azure/ms-rest-js.git
Add publish scripts
This commit is contained in:
Родитель
f614aefbee
Коммит
76131a1848
|
@ -0,0 +1,19 @@
|
|||
const semver = require("semver");
|
||||
const util = require("util");
|
||||
const cp= require("child_process");
|
||||
const exec=util.promisify(cp.exec);
|
||||
|
||||
async function main() {
|
||||
const package_json = require("../package.json");
|
||||
const baseVersion = (package_json.version).trim()
|
||||
const v = (await exec("git rev-list --parents HEAD --count --full-history")).stdout.trim();
|
||||
|
||||
const version = `${semver.major(baseVersion)}.${semver.minor(baseVersion)}.${v}`
|
||||
|
||||
console.log(`Using version ${version}`);
|
||||
process.argv.push(`publish`,`--access`,`public`,`--tag`,`preview`,`--new-version`,`${version}`, `--no-git-tag-version`);
|
||||
// now, on with the publish...
|
||||
require( "yarn/lib/cli.js" );
|
||||
}
|
||||
|
||||
main();
|
|
@ -2698,6 +2698,12 @@
|
|||
"es6-symbol": "^3.1.1"
|
||||
}
|
||||
},
|
||||
"es6-object-assign": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/es6-object-assign/-/es6-object-assign-1.1.0.tgz",
|
||||
"integrity": "sha1-wsNYJlYkfDnqEHyx5mUrb58kUjw=",
|
||||
"dev": true
|
||||
},
|
||||
"es6-symbol": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz",
|
||||
|
@ -7412,6 +7418,36 @@
|
|||
"integrity": "sha1-ATKgVBemEmhmQmrPEW8e1WI6XNA=",
|
||||
"dev": true
|
||||
},
|
||||
"shx": {
|
||||
"version": "0.2.2",
|
||||
"resolved": "https://registry.npmjs.org/shx/-/shx-0.2.2.tgz",
|
||||
"integrity": "sha1-CjBNAgsO3xMGrYFXDoDwNG31ijk=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"es6-object-assign": "^1.0.3",
|
||||
"minimist": "^1.2.0",
|
||||
"shelljs": "^0.7.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"minimist": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
|
||||
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
|
||||
"dev": true
|
||||
},
|
||||
"shelljs": {
|
||||
"version": "0.7.8",
|
||||
"resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.7.8.tgz",
|
||||
"integrity": "sha1-3svPh0sNHl+3LhSxZKloMEjprLM=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"glob": "^7.0.0",
|
||||
"interpret": "^1.0.0",
|
||||
"rechoir": "^0.6.2"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"signal-exit": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
|
||||
|
@ -8955,6 +8991,12 @@
|
|||
"camelcase": "^4.1.0"
|
||||
}
|
||||
},
|
||||
"yarn": {
|
||||
"version": "1.6.0",
|
||||
"resolved": "https://registry.npmjs.org/yarn/-/yarn-1.6.0.tgz",
|
||||
"integrity": "sha1-nOxveYbcI3057HBc502VFV/lXUs=",
|
||||
"dev": true
|
||||
},
|
||||
"yeoman-environment": {
|
||||
"version": "2.0.6",
|
||||
"resolved": "https://registry.npmjs.org/yeoman-environment/-/yeoman-environment-2.0.6.tgz",
|
||||
|
|
|
@ -57,6 +57,7 @@
|
|||
"mocha-chrome": "^1.1.0",
|
||||
"npm-run-all": "^4.1.2",
|
||||
"should": "5.2.0",
|
||||
"shx": "^0.2.2",
|
||||
"ts-loader": "^4.2.0",
|
||||
"ts-node": "^5.0.1",
|
||||
"tslint": "^5.10.0",
|
||||
|
@ -64,7 +65,8 @@
|
|||
"uglify-es": "^3.1.0",
|
||||
"webpack": "^4.6.0",
|
||||
"webpack-cli": "^2.0.14",
|
||||
"webpack-dev-middleware": "^3.1.2"
|
||||
"webpack-dev-middleware": "^3.1.2",
|
||||
"yarn": "^1.6.0"
|
||||
},
|
||||
"homepage": "https://github.com/Azure/ms-rest-js",
|
||||
"repository": {
|
||||
|
@ -86,6 +88,7 @@
|
|||
"test:nodejs-unit": "mocha",
|
||||
"test:mocha-chrome": "sleep 0.5 && mocha-chrome http://localhost:3001",
|
||||
"test:chrome-unit": "run-p -r test:server test:mocha-chrome",
|
||||
"prepare": "npm run build"
|
||||
"prepare": "npm run build",
|
||||
"publish-preview": "npm test && shx rm -rf dist/test && node ./.scripts/publish"
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче