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

Commit 17d8a52

Browse files
committed
chore(scripts): publish 1.2.x releases to npm with correct tag
1 parent 84bf883 commit 17d8a52

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

scripts/bower/publish.sh

+18
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,24 @@ function publish {
8888
cd $TMP_DIR/bower-$repo
8989
git push origin master
9090
git push origin v$NEW_VERSION
91+
92+
# don't publish every build to npm
93+
if [ "${NEW_VERSION/+sha}" = "$NEW_VERSION" ] ; then
94+
if [ "${NEW_VERSION/-}" = "$NEW_VERSION" ] ; then
95+
if [[ $NEW_VERSION =~ ^1\.2\.[0-9]+$ ]] ; then
96+
# publish 1.2.x releases with the appropriate tag
97+
# this ensures that `npm install` by default will not grab `1.2.x` releases
98+
npm publish --tag=1.2.x
99+
else
100+
# publish releases as "latest"
101+
npm publish
102+
fi
103+
else
104+
# publish prerelease builds with the beta tag
105+
npm publish --tag=beta
106+
fi
107+
fi
108+
91109
cd $SCRIPT_DIR
92110
done
93111
}

0 commit comments

Comments
 (0)