Skip to content

Commit

Permalink
chore(scripts): publish 1.2.x releases to npm with correct tag
Browse files Browse the repository at this point in the history
  • Loading branch information
btford committed Nov 20, 2014
1 parent eab2718 commit 158241e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions scripts/bower/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,14 @@ function publish {
# don't publish every build to npm
if [ "${NEW_VERSION/+sha}" = "$NEW_VERSION" ] ; then
if [ "${NEW_VERSION/-}" = "$NEW_VERSION" ] ; then
# publish releases as "latest"
npm publish
if [[ $NEW_VERSION =~ ^1\.2\.[0-9]+$ ]] ; then
# publish 1.2.x releases with the appropriate tag
# this ensures that `npm install` by default will not grab `1.2.x` releases
npm publish --tag=1.2.x
else
# publish releases as "latest"
npm publish
fi
else
# publish prerelease builds with the beta tag
npm publish --tag=beta
Expand Down

0 comments on commit 158241e

Please sign in to comment.