updated postversion script
This commit is contained in:
parent
015cd77f75
commit
0e7eb33465
2 changed files with 15 additions and 2 deletions
|
@ -24,8 +24,8 @@
|
||||||
"lint": "npx eslint . -c ./.github/linters/.eslintrc.yml",
|
"lint": "npx eslint . -c ./.github/linters/.eslintrc.yml",
|
||||||
"package": "ncc build src/index.ts --license licenses.txt",
|
"package": "ncc build src/index.ts --license licenses.txt",
|
||||||
"package:watch": "npm run package -- --watch",
|
"package:watch": "npm run package -- --watch",
|
||||||
"prepare": "husky install",
|
"postversion": "./scripts/postversion.sh",
|
||||||
"postversion": "git push origin v$(jq -r .version package.json) && git tag v1 -f && git push origin v1 -f"
|
"prepare": "husky install"
|
||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
13
scripts/postversion.sh
Executable file
13
scripts/postversion.sh
Executable file
|
@ -0,0 +1,13 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euxo pipefail
|
||||||
|
|
||||||
|
VERSION=$(jq -r .version package.json)
|
||||||
|
|
||||||
|
# push the current tag to github
|
||||||
|
git push origin "v$VERSION"
|
||||||
|
# set the v1 tag to this release
|
||||||
|
git tag v1 -f
|
||||||
|
# push the v1 tag to github
|
||||||
|
git push origin v1 -f
|
||||||
|
# create a release on github
|
||||||
|
gh release create "v$VERSION" --generate-notes --verify-tag
|
Loading…
Add table
Reference in a new issue