Add error handling to tagRelease.bash
Change-Id: If17d2d8ec0aded832b400b5bf766bf8722ac360a
diff --git a/tagRelease.bash b/tagRelease.bash
index 4f4f8b7..4992ecf 100644
--- a/tagRelease.bash
+++ b/tagRelease.bash
@@ -50,4 +50,8 @@
commitMessage2="Changelog: $GITILES_REPO_URL/+log/refs/tags/$prevVersion..refs/tags/$nextVersion"
git tag -s $nextVersion -m "$commitMessage1" -m "$commitMessage2"
-echo "Tag created. Now run \`git push --tags\` to push the tags to the server."
+if [ $? -eq 0 ]; then
+ echo "Tag created. Now run \`git push --tags\` to push the tags to the server."
+else
+ echo "The tag could not be created." >&2
+fi