Skip to content

Commit

Permalink
another travis script change for osx
Browse files Browse the repository at this point in the history
  • Loading branch information
itsmattkc committed Mar 8, 2019
1 parent 8710c6b commit 7212d0e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 8 additions & 3 deletions .travis/after_success.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,20 @@

# Check if there's been a new commit since this build, and if so don't upload it

GREP_PATH=grep

REMOTE=$(curl -s -N https://api.github.com/repos/olive-editor/olive/commits/master | grep -Po '(?<=: \")(([a-z0-9])\w+)(?=\")' -m 1)
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
GREP_PATH=ggrep
fi

REMOTE=$(curl -s -N https://api.github.com/repos/olive-editor/olive/commits/master | $GREP_PATH -Po '(?<=: \")(([a-z0-9])\w+)(?=\")' -m 1)
LOCAL=$(git rev-parse HEAD)

if [ "$REMOTE" == "$LOCAL" ]
then
echo "[INFO] This commit is still current. Uploading..."
echo "[INFO] Still current. Uploading..."
else
echo "[INFO] This commit is no longer current. $REMOTE vs $LOCAL - aborting upload."
echo "[INFO] No longer current. $REMOTE vs $LOCAL - aborting upload."
exit 0
fi

Expand Down
2 changes: 1 addition & 1 deletion .travis/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then

brew install ffmpeg qt5 grep
export PATH="/usr/local/opt/grep/libexec/gnubin:/usr/local/opt/qt/bin:/usr/local/opt/python@2/libexec/bin:$PATH"
export PATH="/usr/local/opt/qt/bin:/usr/local/opt/python@2/libexec/bin:$PATH"

elif [[ "$TRAVIS_OS_NAME" == "linux" ]]; then

Expand Down

0 comments on commit 7212d0e

Please sign in to comment.