diff --git a/appveyor.yml b/appveyor.yml index f084c4475..b0a86032a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -9,6 +9,9 @@ branches: # blacklist except: - travis_mac_osx +# Do not build on tags (GitHub only) +skip_tags: true + #---------------------------------# # environment configuration # #---------------------------------# diff --git a/tools/build-macos-script.sh b/tools/build-macos-script.sh index 48e49fc75..ca3eec0d1 100755 --- a/tools/build-macos-script.sh +++ b/tools/build-macos-script.sh @@ -14,10 +14,15 @@ git config --global user.email $GH_EMAIL git remote set-url origin "https://${GH_TOKEN}@github.com/WagicProject/wagic.git" ## Delete remote Travis-Mac branch (if any) -export REMOTE=$(git branch -r | grep "origin/$TRAVIS_MAC_BRANCH\$") -if test -n "$REMOTE" ; then +export REMOTE=$(git branch -r | grep "origin/$TRAVIS_MAC_BRANCH") +if [ "$REMOTE" = "origin/$TRAVIS_MAC_BRANCH" ]; then + echo "Removing old $TRAVIS_MAC_BRANCH branch" + # Delete remote branch + git branch -r -D "origin/$TRAVIS_MAC_BRANCH" # Push (delete) remote branch on temote server (e.g. github) git push origin --delete "$TRAVIS_MAC_BRANCH" +else + echo "No $TRAVIS_MAC_BRANCH to remove" fi ## Create a new branch @@ -26,7 +31,6 @@ git checkout -q -b "$TRAVIS_MAC_BRANCH" "$TRAVIS_BRANCH" ## Write a new Travis-CI configuration file cp tools/macos.travis.yml .travis.yml git add .travis.yml -git rm appveyor.yml git commit -m "Auto-Updated Travis-CI configuration for Mac" ## Push new branch to remote server git push -q origin $TRAVIS_MAC_BRANCH:$TRAVIS_MAC_BRANCH 2> /dev/null > /dev/null