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

Commit a21d49c

Browse files
committed
chore(npm): publish artifacts to npm
Closes #2877
1 parent 43d4fff commit a21d49c

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

scripts/bower/publish.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ function prepare {
7373
cd $TMP_DIR/bower-$repo
7474
replaceJsonProp "bower.json" "version" ".*" "$NEW_VERSION"
7575
replaceJsonProp "bower.json" "angular.*" ".*" "$NEW_VERSION"
76+
replaceJsonProp "package.json" "version" ".*" "$NEW_VERSION"
77+
replaceJsonProp "package.json" "angular.*" ".*" "$NEW_VERSION"
7678

7779
git add -A
7880

@@ -90,6 +92,18 @@ function publish {
9092
cd $TMP_DIR/bower-$repo
9193
git push origin master
9294
git push origin v$NEW_VERSION
95+
96+
# don't publish every build to npm
97+
if [ "${NEW_VERSION/+sha}" = "$NEW_VERSION" ] ; then
98+
if [ "${NEW_VERSION/-}" = "$NEW_VERSION" ] ; then
99+
# publish releases as "latest"
100+
npm publish
101+
else
102+
# publish prerelease builds with the beta tag
103+
npm publish --tag=beta
104+
fi
105+
fi
106+
93107
cd $SCRIPT_DIR
94108
done
95109
}

0 commit comments

Comments
 (0)