[Deploy] Auto semver versioning

This commit is contained in:
Alexander Zinchuk 2021-06-14 20:04:10 +03:00
parent c38f7fcf94
commit 35dff08f29
3 changed files with 2 additions and 3 deletions

View File

@ -1 +0,0 @@
1

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{ {
"name": "telegram-t", "name": "telegram-t",
"version": "1.0.0", "version": "1.0.0-0",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

View File

@ -7,7 +7,7 @@
"dev": "cross-env APP_ENV=development webpack-dev-server -d", "dev": "cross-env APP_ENV=development webpack-dev-server -d",
"build": "webpack -p", "build": "webpack -p",
"build:staging": "rm -rf dist/ && APP_ENV=staging npm run build && ./deploy/copy_to_dist.sh", "build:staging": "rm -rf dist/ && APP_ENV=staging npm run build && ./deploy/copy_to_dist.sh",
"build:production": "npm i && rm -rf dist/ && APP_VERSION=$(npm run inc_version) APP_ENV=production npm run build && ./deploy/copy_to_dist.sh", "build:production": "npm i && rm -rf dist/ && APP_VERSION=$(npm run inc_version --silent) APP_ENV=production npm run build && ./deploy/copy_to_dist.sh",
"deploy:production": "npm run build:production && git add -A && git commit -a -m '[Build]' && git push", "deploy:production": "npm run build:production && git add -A && git commit -a -m '[Build]' && git push",
"inc_version": "echo $((`cat .patch-version` + 1)) > .patch-version && echo \"$(node -p -e \"require('./package.json').version.match(/^\\d+\\.\\d+/)[0]\").$(cat .patch-version)\"", "inc_version": "echo $((`cat .patch-version` + 1)) > .patch-version && echo \"$(node -p -e \"require('./package.json').version.match(/^\\d+\\.\\d+/)[0]\").$(cat .patch-version)\"",
"perf:serve": "APP_ENV=perf parcel src/index-perf.html", "perf:serve": "APP_ENV=perf parcel src/index-perf.html",