From b94a47b1b507391a384be873f91d09f1a672c40a Mon Sep 17 00:00:00 2001 From: Peter Bacon Darwin Date: Mon, 31 Aug 2015 22:17:14 +0100 Subject: [PATCH] chore(scripts/publish): get dist-tag from package.json Closes #12722 --- package.json | 1 + scripts/bower/publish.sh | 17 ++++------------- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index 9f9cb4bd1cf3..4b34bfd9ce28 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,7 @@ { "name": "angularjs", "branchVersion": "1.2.*", + "distTag": "ie8_compat", "repository": { "type": "git", "url": "https://github.com/angular/angular.js.git" diff --git a/scripts/bower/publish.sh b/scripts/bower/publish.sh index c7c0da5ac3d8..d47138c13c21 100755 --- a/scripts/bower/publish.sh +++ b/scripts/bower/publish.sh @@ -108,19 +108,10 @@ function publish { # don't publish every build to npm if [ "${NEW_VERSION/+sha}" = "$NEW_VERSION" ] ; then - if [ "${NEW_VERSION/-}" = "$NEW_VERSION" ] ; then - if [[ $NEW_VERSION =~ ^1\.2\.[0-9]+$ ]] ; then - # publish 1.2.x releases with the appropriate tag - # this ensures that `npm install` by default will not grab `1.2.x` releases - npm publish --tag=old - else - # publish releases as "latest" - npm publish - fi - else - # publish prerelease builds with the beta tag - npm publish --tag=beta - fi + # get the npm dist-tag from a custom property (distTag) in package.json + DIST_TAG=$(readJsonProp "package.json" "distTag") + echo "-- Publishing to npm as $DIST_TAG" + npm publish --tag=$DIST_TAG fi cd $SCRIPT_DIR