diff --git a/tools/build.sh b/tools/build.sh index af16c0019..b7a59eea4 100755 --- a/tools/build.sh +++ b/tools/build.sh @@ -3,7 +3,7 @@ apt-get -y install rsync yarn if test $TAG_NAME; then - export VERSION=$(echo $TAG_NAME | sed 's/^v\(.*\)$/\1/') + export VERSION=$TAG_NAME else export VERSION=$(npm version | head -n 1 | sed "s/^.*: '\([^']*\).*/\1/")-canary.$SHORT_SHA fi diff --git a/tools/release.sh b/tools/release.sh index a1cec6fc6..6a666eaee 100755 --- a/tools/release.sh +++ b/tools/release.sh @@ -1,16 +1,16 @@ echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc cd dist/packages-dist -LATEST_TEST="^v[^-]*$" +PRODUCTION_TEST="^[^-]*$" if test $TAG_NAME; then - if [[ ! $TAG_NAME =~ $LATEST_TEST ]]; then - npm publish . --tag next - else + if [[ $TAG_NAME =~ $PRODUCTION_TEST ]]; then npm publish . && cd ../wrapper-dist && npm publish . && npm deprecate angularfire2 "AngularFire has moved, we're now @angular/fire" + else + npm publish . --tag next fi else npm publish . --tag canary