From d59eed5d3b3acf0d05e41417c69847d042a01d05 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Wed, 7 Aug 2019 00:01:57 -0400 Subject: [PATCH] Accept additional args when publishing --- tasks/publish.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tasks/publish.sh b/tasks/publish.sh index eff9d57145..6c81e594aa 100755 --- a/tasks/publish.sh +++ b/tasks/publish.sh @@ -23,7 +23,7 @@ REMOTE=https://github.com/openlayers/openlayers.git display_usage() { cat <<-EOF - Usage: ${1} + Usage: ${1} [options] To publish a new release, update the version number in package.json and create a tag for the release. @@ -33,6 +33,8 @@ display_usage() { The tag must be pushed to ${REMOTE} before the release can be published. + Additional args afer will be passed to "npm publish" (e.g. "--tag beta"). + EOF } @@ -76,12 +78,13 @@ main() { npm install npm run build-package cd ${BUILT_PACKAGE} - npm publish + shift + npm publish ${@} } -if test ${#} -ne 1; then +if test ${#} -lt 1; then display_usage ${0} exit 1 else - main ${1} + main ${@} fi