Skip to content

Commit

Permalink
#10 updated the circleci script
Browse files Browse the repository at this point in the history
  • Loading branch information
Sami Alajrami committed Nov 16, 2017
1 parent f5c26f5 commit 47ab329
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions .circleci/build.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,23 @@ echo "running tests ..."
go test -v

if [ $? -eq 0 ]; then
echo "releasing ..."
goreleaser | grep -o "error"
echo "building ..."
go build

if [ $? -eq 0 ]; then
goreleaser | grep -o "already_exists"
if [ $? -gt 0 ]; then
echo "ERROR: failed to release. Terminating."
exit 9
echo "cleaning after tests ..."
rm hello.world hello.world1 helmsman
echo "releasing ..."
goreleaser | tee /dev/tty | grep -o "error"
if [ $? -eq 0 ]; then
echo "goreleaser experienced an error and no new releases made. That is Ok!"
else
echo "No new releases made. That is Ok!"
fi
echo "New release was successfully made."
fi
else
echo "New release was successfully made."
fi
echo "Build failed!!"
exit 9
fi
else
echo "tests failed ... Aborting!"
exit 9
Expand Down

0 comments on commit 47ab329

Please sign in to comment.