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

Commit b94a47b

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

File tree

2 files changed

+5
-13
lines changed

2 files changed

+5
-13
lines changed

Diff for: package.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
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"

Diff for: scripts/bower/publish.sh

+4-13
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)