Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 40e9bcd

Browse files
chore(scripts/publish): get dist-tag from package.json
Closes #12722
1 parent f98e038 commit 40e9bcd

File tree

2 files changed

+5
-13
lines changed

2 files changed

+5
-13
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "angularjs",
33
"branchVersion": "1.3.*",
4+
"distTag": "previous_1_3",
45
"repository": {
56
"type": "git",
67
"url": "https://github.com/angular/angular.js.git"

scripts/bower/publish.sh

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -110,19 +110,10 @@ function publish {
110110

111111
# don't publish every build to npm
112112
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
126117
fi
127118

128119
cd $SCRIPT_DIR

0 commit comments

Comments
 (0)