File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -15,12 +15,18 @@ if [[ -z $PUBLISH_NPM_TAG ]]; then
1515 exit 1
1616fi
1717
18+ CURRENT_PACKAGE_VERSION=$( jq --raw-output .version package.json)
19+
20+ if [[ " $CURRENT_PACKAGE_VERSION " = " 0.0.0" ]]; then
21+ echo " Notice: Invalid version: $CURRENT_PACKAGE_VERSION . aborting publish."
22+ exit 0
23+ fi
24+
1825# check param, if it's set (monorepo) we check if it's published before proceeding
1926if [[ -n " $1 " ]]; then
2027 # check if module is published
2128 PACKAGE_NAME=$( jq --raw-output .name package.json)
2229 LATEST_PACKAGE_VERSION=$( npm view " $PACKAGE_NAME " dist-tags --workspaces false --json | jq --raw-output --arg tag " $PUBLISH_NPM_TAG " ' .[$tag]' || echo " " )
23- CURRENT_PACKAGE_VERSION=$( jq --raw-output .version package.json)
2430
2531 if [ " $LATEST_PACKAGE_VERSION " = " $CURRENT_PACKAGE_VERSION " ]; then
2632 echo " Notice: This module is already published at $CURRENT_PACKAGE_VERSION . aborting publish."
You can’t perform that action at this time.
0 commit comments