forked from FirebaseExtended/reactfire
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpublish.sh
More file actions
executable file
·38 lines (27 loc) · 791 Bytes
/
publish.sh
File metadata and controls
executable file
·38 lines (27 loc) · 791 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
cd reactfire/pub/reactfire
# TODO once we go 2.0.0 stable, uncomment
# LATEST_TEST="^[^-]*$"
# Publish -rc tags on @latest for now
LATEST_TEST="^[^-]*-rc"
if test $NPM_TOKEN; then
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc
cp ../../../README.md .
cp -r ../../../docs .
cp ../../../LICENSE .
if test $TAG_NAME; then
npm version $(echo $TAG_NAME | sed 's/^v\(.*\)$/\1/')
if [[ $TAG_NAME =~ $LATEST_TEST ]]; then
NPM_TAG=latest
else
NPM_TAG=next
fi
npm publish . --tag $NPM_TAG
ret=$?
else
npm version $(npm version | sed -n "s/. reactfire: '\(.*\)',/\1/p")-canary.$SHORT_SHA
npm publish . --tag canary
ret=$?
fi
rm -f .npmrc
fi
exit $ret