diff --git a/package.json b/package.json index 2eaffa43e9d9..93503ac37fea 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "license": "MIT", "branchVersion": "^1.4.0-beta.0", "branchPattern": "1.4.*", + "distTag": "latest", "repository": { "type": "git", "url": "https://github.com/angular/angular.js.git" diff --git a/scripts/bower/publish.sh b/scripts/bower/publish.sh index 5189206f4384..24b1ec8aa069 100755 --- a/scripts/bower/publish.sh +++ b/scripts/bower/publish.sh @@ -95,19 +95,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