File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33 "license" : " MIT" ,
44 "branchVersion" : " ^1.4.0-beta.0" ,
55 "branchPattern" : " 1.4.*" ,
6+ "distTag" : " latest" ,
67 "repository" : {
78 "type" : " git" ,
89 "url" : " https://github.com/angular/angular.js.git"
Original file line number Diff line number Diff line change @@ -95,19 +95,10 @@ function publish {
9595
9696 # don't publish every build to npm
9797 if [ " ${NEW_VERSION/ +sha} " = " $NEW_VERSION " ] ; then
98- if [ " ${NEW_VERSION/ -} " = " $NEW_VERSION " ] ; then
99- if [[ $NEW_VERSION =~ ^1\. 2\. [0-9]+$ ]] ; then
100- # publish 1.2.x releases with the appropriate tag
101- # this ensures that `npm install` by default will not grab `1.2.x` releases
102- npm publish --tag=old
103- else
104- # publish releases as "latest"
105- npm publish
106- fi
107- else
108- # publish prerelease builds with the beta tag
109- npm publish --tag=beta
110- fi
98+ # get the npm dist-tag from a custom property (distTag) in package.json
99+ DIST_TAG=$( readJsonProp " package.json" " distTag" )
100+ echo " -- Publishing to npm as $DIST_TAG "
101+ npm publish --tag=$DIST_TAG
111102 fi
112103
113104 cd $SCRIPT_DIR
You can’t perform that action at this time.
0 commit comments