File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
22 "name" : " angularjs" ,
33 "branchVersion" : " 1.2.*" ,
4+ "distTag" : " ie8_compat" ,
45 "repository" : {
56 "type" : " git" ,
67 "url" : " https://github.com/angular/angular.js.git"
Original file line number Diff line number Diff line change @@ -108,19 +108,10 @@ function publish {
108108
109109 # don't publish every build to npm
110110 if [ " ${NEW_VERSION/ +sha} " = " $NEW_VERSION " ] ; then
111- if [ " ${NEW_VERSION/ -} " = " $NEW_VERSION " ] ; then
112- if [[ $NEW_VERSION =~ ^1\. 2\. [0-9]+$ ]] ; then
113- # publish 1.2.x releases with the appropriate tag
114- # this ensures that `npm install` by default will not grab `1.2.x` releases
115- npm publish --tag=old
116- else
117- # publish releases as "latest"
118- npm publish
119- fi
120- else
121- # publish prerelease builds with the beta tag
122- npm publish --tag=beta
123- fi
111+ # get the npm dist-tag from a custom property (distTag) in package.json
112+ DIST_TAG=$( readJsonProp " package.json" " distTag" )
113+ echo " -- Publishing to npm as $DIST_TAG "
114+ npm publish --tag=$DIST_TAG
124115 fi
125116
126117 cd $SCRIPT_DIR
You can’t perform that action at this time.
0 commit comments