Skip to content

Commit

Permalink
- Bail if the commit has already been built
Browse files Browse the repository at this point in the history
  • Loading branch information
justindhill committed Jun 30, 2019
1 parent 5c41f89 commit 7d8938d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .travis-build.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
#!/bin/sh

TAGS_RESPONSE=`curl -X GET \
-H "Authorization: token $GITHUB_TOKEN" \
"https://api.github.com/repos/justindhill/YDNYNAB/releases"`

LATEST_TAG_SHA=`echo $TAGS_RESPONSE | jq -r '.[0].commit.sha'`
if [[ "$TRAVIS_COMMIT" -eq "$LATEST_TAG_SHA" ]]; then
echo "This commit has already been built. Bailing."
fi


set -o pipefail && xcodebuild -workspace "YDNYNAB.xcworkspace" -scheme "YDNYNAB" -configuration "Release" -derivedDataPath "$TRAVIS_BUILD_DIR/build-out" clean build | xcpretty

# if [ "$TRAVIS_EVENT_TYPE" != "cron" ]; then
Expand Down

0 comments on commit 7d8938d

Please sign in to comment.