From c25ebc4adc322cdfdc9fd97f79b2515d979873a8 Mon Sep 17 00:00:00 2001 From: mittorn Date: Sun, 24 Sep 2017 10:21:49 +0000 Subject: [PATCH] Use git credentials --- .travis.yml | 2 +- travis-deploy.sh | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index d44c46c9..d1a3972a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,7 +19,7 @@ notifications: email: false before_install: - - wget http://dl.google.com/android/ndk/android-ndk-r10e-linux-x86_64.bin + - wget http://dl.google.com/android/ndk/android-ndk-r10e-linux-x86_64.bin > /dev/null 2>/dev/null - chmod +x android-ndk-r10e-linux-x86_64.bin && ./android-ndk-r10e-linux-x86_64.bin > /dev/null - mv android-ndk-r10e android-ndk - export PATH=`pwd`/android-ndk:`pwd`/android-sdk-linux/tools:`pwd`/android-sdk-linux/platform-tools:$PATH diff --git a/travis-deploy.sh b/travis-deploy.sh index 75633c3a..bebd9021 100644 --- a/travis-deploy.sh +++ b/travis-deploy.sh @@ -11,7 +11,10 @@ else git init 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 + git config credential.helper "store --file=.git/credentials" + git config credential.https://github.com.com.username FWGS-deployer + echo "https://FWGS-deployer${GH_TOKEN}@github.com" > .git/credentials + git remote add travis-deploy-public https://github.com/FWGS/xash3d-deploy.git echo \# $TRAVIS_BRANCH branch autobuilds from $SOURCE_NAME >> README.md echo >> README.md echo Short changelog: >> README.md @@ -31,8 +34,8 @@ else git add . 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 > /dev/null 2>/dev/null + 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 > /dev/null 2>/dev/null + git push -q --force travis-deploy-public $SOURCE_NAME-latest fi exit 0