From ff9e8fdeb14fef928d93dd05e194776e8bba6254 Mon Sep 17 00:00:00 2001 From: Maciej Lenartowicz Date: Tue, 15 Oct 2019 10:10:33 +0200 Subject: [PATCH] Added quotes to shell variables --- scripts/publish.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/publish.sh b/scripts/publish.sh index 565bde3..6aa73cd 100755 --- a/scripts/publish.sh +++ b/scripts/publish.sh @@ -6,12 +6,12 @@ then exit 1 else # Need to replace "_" with "_" as GitLab CI won't accept secret vars with "-" - echo "//registry.npmjs.org/:_authToken=$(echo $NPM_TOKEN | tr _ -)" > .npmrc + echo "//registry.npmjs.org/:_authToken=$(echo "$NPM_TOKEN" | tr _ -)" > .npmrc echo "unsafe-perm = true" >> ~/.npmrc if test "$1" = "beta" then BETA_VERSION=$(npx -c 'echo "$npm_package_version"')-beta.$CI_COMMIT_SHORT_SHA - npm version $BETA_VERSION --git-tag-version false + npm version "$BETA_VERSION" --git-tag-version false npm publish --tag beta elif test "$1" = "latest" then