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

Commit 158241e

Browse files
committed
chore(scripts): publish 1.2.x releases to npm with correct tag
1 parent eab2718 commit 158241e

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

scripts/bower/publish.sh

+8-2
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,14 @@ function publish {
9696
# don't publish every build to npm
9797
if [ "${NEW_VERSION/+sha}" = "$NEW_VERSION" ] ; then
9898
if [ "${NEW_VERSION/-}" = "$NEW_VERSION" ] ; then
99-
# publish releases as "latest"
100-
npm publish
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=1.2.x
103+
else
104+
# publish releases as "latest"
105+
npm publish
106+
fi
101107
else
102108
# publish prerelease builds with the beta tag
103109
npm publish --tag=beta

0 commit comments

Comments
 (0)