Skip to content

Commit

Permalink
Merge pull request #11 from OpenSmalltalk/tim/deployment-fixes
Browse files Browse the repository at this point in the history
fix deployment to only run on master and Cog branch, and not for pull requests
  • Loading branch information
fniephaus committed Jun 21, 2016
2 parents 5ecc818 + cad7fcb commit d0d631e
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 21 deletions.
11 changes: 1 addition & 10 deletions .appveyor.yml
Expand Up @@ -3,7 +3,7 @@ environment:
CYG_MIRROR: http://cygwin.mirror.constant.com
CYG_CACHE: C:\cygwin\var\cache\setup
CYG_BASH: C:\cygwin\bin\bash
BINTRAY-API-KEY:
BINTRAYAPIKEY:
secure: uknPzww818XWJiLecwur9p1MfrkACOyx9d3iNrw/TuD89EoPSc8zLqKdPZjWdcQd
matrix:
- FLAVOR: newspeak.cog.spur
Expand Down Expand Up @@ -36,12 +36,3 @@ build: false
# default file handles. Ensure a dummy file descriptor is opened with 'exec'.
test_script:
- '%CYG_BASH% -lc "cd $APPVEYOR_BUILD_FOLDER; exec 0</dev/null; ./.travis_build.sh"'

# We're using Travis' deployment gem, so we can use the same bintray.json
on_success:
- '%CYG_BASH% -lc "cd $APPVEYOR_BUILD_FOLDER; exec 0</dev/null; ./.travis_prepare_deployment.sh"'
- SET PATH=C:\\Ruby23\\bin;%PATH%
- gem install dpl
- appveyor DownloadFile https://curl.haxx.se/ca/cacert.pem
- SET SSL_CERT_FILE=cacert.pem
- dpl --provider=bintray --user=timfel --key=%BINTRAY-API-KEY% --file=.bintray.json
5 changes: 0 additions & 5 deletions .travis.yml
Expand Up @@ -251,8 +251,3 @@ install:
- ./.travis_install.sh
script:
- $CHROOT ./.travis_build.sh

after_success:
- ./.travis_prepare_deployment.sh
- gem install dpl
- dpl --provider=bintray --user=timfel --key=$BINTRAYAPIKEY --file=.bintray.json
26 changes: 26 additions & 0 deletions .travis_build.sh
Expand Up @@ -130,3 +130,29 @@ case "$PLATFORM" in
exit 99
;;
esac

exitcode=$?

if [ $exitcode -eq 0 ]; then
[[ "$TRAVIS_PULL_REQUEST" == "true" ]] && exit $exitcode

PR=${TRAVIS_PULL_REQUEST:-${APPVEYOR_PULL_REQUEST_NUMBER:-false}}
BR=${TRAVIS_BRANCH:-${APPVEYOR_REPO_BRANCH}}

if [[ $PR == "false" ]] && ( [[ "$BR" == "Cog" || "$BR" == "master" ]] ); then
echo "`cat .bintray.json | .git_filters/RevDateURL.smudge`" > .bintray.json
sed -i.bak 's/$Rev: \([0-9][0-9]*\) \$/\1/' .bintray.json
sed -i.bak 's/$Date: \(.*\) \$/\1/' .bintray.json
rm -f .bintray.json.bak

if [[ "${APPVEYOR}" ]]; then
export PATH="/cygdrive/c/Ruby23/bin:$PATH"
appveyor DownloadFile https://curl.haxx.se/ca/cacert.pem
export SSL_CERT_FILE=cacert.pem
fi
gem install dpl
dpl --provider=bintray --user=timfel --key=$BINTRAYAPIKEY --file=.bintray.json
fi
fi

exit $exitcode
6 changes: 0 additions & 6 deletions .travis_prepare_deployment.sh

This file was deleted.

0 comments on commit d0d631e

Please sign in to comment.