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