File tree 2 files changed +5
-13
lines changed
2 files changed +5
-13
lines changed Original file line number Diff line number Diff line change 3
3
"license" : " MIT" ,
4
4
"branchVersion" : " ^1.4.0-beta.0" ,
5
5
"branchPattern" : " 1.4.*" ,
6
+ "distTag" : " latest" ,
6
7
"repository" : {
7
8
"type" : " git" ,
8
9
"url" : " https://github.com/angular/angular.js.git"
Original file line number Diff line number Diff line change @@ -95,19 +95,10 @@ function publish {
95
95
96
96
# don't publish every build to npm
97
97
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
111
102
fi
112
103
113
104
cd $SCRIPT_DIR
You can’t perform that action at this time.
0 commit comments