Skip to content

Commit 50fdebc

Browse files
author
Chris Raynor
committed
Improvements to the release script
1 parent 2a862d6 commit 50fdebc

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

release.sh

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,29 @@ if [[ $? -ne 0 ]]; then
5454
echo "!!! Error publishing to npm! You must do this manually by running 'npm publish'. !!!"
5555
exit 1
5656
else
57-
echo "*** v${VERSION} published to npm ***"
57+
echo "*** v${VERSION} published to npm as firebase-tools ***"
5858
echo
5959
fi
6060

61+
sed -i.bak s/\"firebase-tools\"/\"firebase-cli\"/g package.json
62+
if [[ $? -ne 0 ]]; then
63+
echo "Error: Failed to replace firebase-tools with firebase-cli in the package.json."
64+
exit 1
65+
fi
66+
rm package.json.bak
67+
68+
# Publish the alternative version to npm
69+
npm publish
70+
if [[ $? -ne 0 ]]; then
71+
echo "!!! Error publishing to npm! You must do this manually by running 'npm publish'. !!!"
72+
exit 1
73+
else
74+
echo "*** v${VERSION} published to npm as firebase-cli ***"
75+
echo
76+
fi
77+
78+
git checkout -- package.json
79+
6180
echo "Manual steps remaining:"
6281
echo " 1) Update the release notes for firebase-tools version ${VERSION} on GitHub"
6382
echo " 2) Update all firebase-tools version numbers specified in firebase-website to ${VERSION}"

0 commit comments

Comments
 (0)