From f5d95f731496cbf17ef4b0362500a171b0a45000 Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 4 Nov 2016 09:40:24 +0000 Subject: [PATCH] Use an env var for the package version Because supplying arguments to npm scripts is a bad idea: it just appends the arguments blindly to whatever the command was. Thanks, npm. --- scripts/package.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/package.sh b/scripts/package.sh index 64d555533c..d5deffef64 100755 --- a/scripts/package.sh +++ b/scripts/package.sh @@ -2,8 +2,8 @@ set -e -if [ $# -eq 1 ]; then - version=$1 +if [ -n "$DIST_VERSION" ]; then + version=$DIST_VERSION else version=`git describe --dirty --tags || echo unknown` fi