Update deploy script
This commit is contained in:
parent
5368a7f56b
commit
aaba1b6db9
2 changed files with 28 additions and 8 deletions
|
@ -47,4 +47,4 @@ script:
|
|||
|
||||
after_script:
|
||||
- sh travis-upload.sh *.apk
|
||||
- sh travis-deploy.sh *.apk
|
||||
- sh travis-deploy.sh android-optimized *.apk
|
||||
|
|
|
@ -3,16 +3,36 @@ if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
|
|||
echo "Travis should not deploy from pull requests"
|
||||
exit 0
|
||||
else
|
||||
SOURCE_NAME=$1
|
||||
shift
|
||||
mkdir xash3d-travis
|
||||
cp -a $* xash3d-travis/
|
||||
cd xash3d-travis
|
||||
git init
|
||||
git config user.name mittorn
|
||||
git config user.email mittorn@sibmail.com
|
||||
git remote add travis-deploy-public https://mittorn:${GH_TOKEN}@github.com/mittorn/xash3d-travis.git
|
||||
git config user.name FWGS-deployer
|
||||
git config user.email FWGS-deployer@users.noreply.github.com
|
||||
git remote add travis-deploy-public https://FWGS-deployer:${GH_TOKEN}@github.com/FWGS/xash3d-deploy.git
|
||||
echo \# $TRAVIS_BRANCH branch autobuilds from $SOURCE_NAME >> README.md
|
||||
echo >> README.md
|
||||
echo Short changelog: >> README.md
|
||||
echo \`\`\` >> README.md
|
||||
(cd ..;git log --pretty=format:'%h %ad %s' --date iso -n 10 HEAD `curl https://raw.githubusercontent.com/FWGS/xash3d-deploy/$SOURCE_NAME-$TRAVIS_BRANCH/commit.txt`.. )| cut -d ' ' -f 1-3,5-100 >> README.md
|
||||
echo \`\`\` >> README.md
|
||||
echo >> README.md
|
||||
echo [code on github]\(https://github.com/FWGS/xash3d-android-project/tree/$TRAVIS_COMMIT\) >> README.md
|
||||
echo >> README.md
|
||||
echo [full changelog for this build]\(https://github.com/FWGS/xash3d-android-project/commits/$TRAVIS_COMMIT\) >> README.md
|
||||
echo >> README.md
|
||||
for arg in $*; do
|
||||
echo \* [$arg]\(https://github.com/FWGS/xash3d-deploy/blob/$SOURCE_NAME-$TRAVIS_BRANCH/$arg\?raw\=true\) >> README.md
|
||||
echo >> README.md
|
||||
done
|
||||
echo $TRAVIS_COMMIT > commit.txt
|
||||
git add .
|
||||
git commit -m "Laterst travis android optimized deploy $TRAVIS_COMMIT"
|
||||
git checkout -b android-optimized-$TRAVIS_BRANCH
|
||||
git push --force travis-deploy-public android-optimized-$TRAVIS_BRANCH
|
||||
git commit -m "Laterst travis deploy $TRAVIS_COMMIT"
|
||||
git checkout -b $SOURCE_NAME-$TRAVIS_BRANCH
|
||||
git push -q --force travis-deploy-public $SOURCE_NAME-$TRAVIS_BRANCH
|
||||
git checkout -b $SOURCE_NAME-latest
|
||||
git push -q --force travis-deploy-public $SOURCE_NAME-latest
|
||||
fi
|
||||
exit 0
|
||||
exit 0
|
||||
|
|
Loading…
Add table
Reference in a new issue