mirror of
https://github.com/YMFE/yapi.git
synced 2025-04-06 15:00:26 +08:00
chore: update static file
This commit is contained in:
parent
e2dfc78afb
commit
353668e2ae
24
npm-publish.js
Normal file
24
npm-publish.js
Normal file
@ -0,0 +1,24 @@
|
||||
const shell = require ('shelljs');
|
||||
const packageJson = require ('./package.json');
|
||||
|
||||
const version = packageJson.json;
|
||||
|
||||
shell.exec ('npm install --registry https://registry.npm.taobao.org');
|
||||
shell.exec ('npm run build-client');
|
||||
shell.exec ('git add .');
|
||||
shell.exec ('git commit -a -m "chore: update static file"');
|
||||
|
||||
console.log ('exec: git pull origin master');
|
||||
shell.exec ('git pull origin master');
|
||||
let a = shell.exec (`git tag |grep ${version} |wc -l`);
|
||||
if (a && parseInt (a) > 0) {
|
||||
shell.exec ('git tag -d ' + version);
|
||||
shell.exec ('git push origin :' + version);
|
||||
}
|
||||
shell.exec ('git tag ' + version);
|
||||
shell.exec ('git push origin ' + version);
|
||||
|
||||
console.log('git push success', version)
|
||||
|
||||
console.log('正在执行npm发布')
|
||||
shell.exec('npm run publish')
|
9878
package-lock.json
generated
9878
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -11,7 +11,8 @@
|
||||
"dev": "npm run dev-server & npm run dev-client",
|
||||
"start": " node server/app.js",
|
||||
"test": "ava",
|
||||
"build-client": "NODE_ENV=production ykit pack -m"
|
||||
"build-client": "NODE_ENV=production ykit pack -m",
|
||||
"npm-publish": "node ./npm-publish.js"
|
||||
},
|
||||
"scripts-info": {
|
||||
"start": "运行生产环境服务器",
|
||||
|
Loading…
x
Reference in New Issue
Block a user