forked from astropy/package-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis-deploy.sh
24 lines (21 loc) · 870 Bytes
/
.travis-deploy.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
set -evax
if [[ "${TRAVIS_PULL_REQUEST}" = "false" && "$TRAVIS_OS_NAME" = "linux" && $TASK = 'render' ]]; then
openssl aes-256-cbc -K $encrypted_c554857c6215_key -iv $encrypted_c554857c6215_iv -in github_deploy_key.enc -out ~/.ssh/publish-key -d
chmod u=rw,og= ~/.ssh/publish-key
echo "Host github.com" >> ~/.ssh/config
echo " IdentityFile ~/.ssh/publish-key" >> ~/.ssh/config
base_dir=$(pwd)
cd ../test/
git clone [email protected]:astropy/package-template rendered
cd rendered
git --version
git config --global user.name "Travis CI"
git config --global user.email "[email protected]"
git remote update
git checkout master
rsync -avz --delete --exclude .git/ ../packagename/ ./
git add -A
git commit --allow-empty -m "Update rendered version to ""$TRAVIS_COMMIT"
git push origin master
fi