Skip to content
This repository has been archived by the owner on Sep 8, 2020. It is now read-only.

Commit

Permalink
Modified exit status of script to prevent build from failing
Browse files Browse the repository at this point in the history
  • Loading branch information
nareddyt committed Feb 24, 2018
1 parent efed388 commit 012474c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .circleci/prod-ready.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@
# DO NOT edit this file on Windows. It will cause CRLF line endings, which will fail on CircleCI.
# If you do edit on Windows, use `dos2unix` before you commit.

set -e

# If there is no tag, the script will have non-0 exit code
GIT_TAG=$(git describe --exact-match --tags HEAD)
# If there is no tag, this command will fail and the script will automatically exit!
if [ ! $? -eq 0 ]; then
echo "This commit doesn't have a tag, skip setting the version."
exit 0
fi

echo "Found a tag $GIT_TAG"
VERSION_NUM=$( echo ${GIT_TAG} | cut -c 2- )
Expand Down

0 comments on commit 012474c

Please sign in to comment.