File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 1+ //registry.npmjs.org/:_authToken = ${ NPM_ACCESS_TOKEN }
Original file line number Diff line number Diff line change 22
33set -euf -o pipefail
44
5- if [[ $# -ne 2 ]]; then
6- echo " Wrong number of arguments!"
5+ if [[ $# -ne 1 ]]; then
6+ echo " Wrong number of arguments! Access token required. "
77 exit 2
88fi
99
10- TOKEN=$1
11-
12- SCRIPT_LOCATION=$( dirname -- " $( readlink -f -- " ${BASH_SOURCE[0]} " ) " )
13- PACKAGE_JSON=" ${SCRIPT_LOCATION} /../package.json"
14- VERSION=$( jq -r ' .version' ${PACKAGE_JSON} )
10+ NPM_ACCESS_TOKEN=$1
11+ VERSION=$( npm pkg get version)
1512
1613# for prettier printing
1714VIOLET=' \033[0;35m'
@@ -37,10 +34,12 @@ echo -e "${VIOLET}Building successful${NC}"
3734echo
3835echo -e " ${VIOLET} Create version tag${NC} "
3936git tag -a ${VERSION} -m " Release version ${VERSION} "
40- git push origin ${VERSION}
37+ git push --tags
4138
4239echo
4340echo -e " ${VIOLET} Publishing package${NC} "
41+ # requires an access token, that is stored in an
42+ # environment variable with the same name as the on required in .npmrc
4443# npm publish --access public
4544
4645echo
You can’t perform that action at this time.
0 commit comments