Add a github deploy key for merges from SF

Update travis yaml
This commit is contained in:
David Lewis 2018-03-22 01:43:06 -07:00
parent 829cf39f35
commit 1eb15467fd
4 changed files with 22 additions and 0 deletions

View File

@ -7,6 +7,10 @@ addons:
apt:
packages:
- ant-optional
before_install:
- if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_EVENT_TYPE" == "cron" ]]; then .travis/merge-sourceforge.sh; fi
after_script:
- if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_EVENT_TYPE" == "cron" ]]; then .travis/deploy-sourceforge-merge.sh; fi
script:
- ant testci
before_deploy:

View File

@ -0,0 +1,3 @@
#!/bin/bash
git push github master

Binary file not shown.

15
.travis/merge-sourceforge.sh Executable file
View File

@ -0,0 +1,15 @@
#!/bin/bash
set -xe
# Create a deploy key from the encrypted file
openssl aes-256-cbc -K $encrypted_57654742c400_key -iv $encrypted_57654742c400_iv \
-in ./.travis/freecol-deploy-key.enc -out freecol-deploy-key -d
chmod 600 freecol-deploy-key
eval $(ssh-agent -s)
ssh-add freecol-deploy-key
git remote add upstream git://git.code.sf.net/p/freecol/git
git remote add github git@github.com:FreeCol/freecol.git
git remote update
git checkout master
git merge upstream/master --no-edit