mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-17 18:40:02 +00:00
scripts: travis: fix deployment, finally
This commit is contained in:
parent
5f122a7435
commit
8b07916598
@ -35,6 +35,16 @@ generate_readme()
|
|||||||
echo $TRAVIS_COMMIT > commit.txt
|
echo $TRAVIS_COMMIT > commit.txt
|
||||||
}
|
}
|
||||||
|
|
||||||
|
yadisk_download()
|
||||||
|
{
|
||||||
|
FOLDER_NAME=$DEPLOY_BRANCH-$TRAVIS_BRANCH
|
||||||
|
WEBDAV_SRV=https://$YANDEX_DISK_USER:$YANDEX_DISK_TOKEN@webdav.yandex.ru
|
||||||
|
|
||||||
|
for file in $*; do
|
||||||
|
curl -L $WEBDAV_SRV/$FOLDER_NAME/$file -o $file
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
PUSHED_COMMIT=$(curl --fail https://raw.githubusercontent.com/FWGS/xash3d-deploy/$DEPLOY_BRANCH-$TRAVIS_BRANCH/commit.txt)
|
PUSHED_COMMIT=$(curl --fail https://raw.githubusercontent.com/FWGS/xash3d-deploy/$DEPLOY_BRANCH-$TRAVIS_BRANCH/commit.txt)
|
||||||
echo "Pushed commit: $PUSHED_COMMIT"
|
echo "Pushed commit: $PUSHED_COMMIT"
|
||||||
if [ ! -z "$PUSHED_COMMIT" ]; then
|
if [ ! -z "$PUSHED_COMMIT" ]; then
|
||||||
@ -54,7 +64,7 @@ cd xash3d-deploy
|
|||||||
git init
|
git init
|
||||||
git remote add travis-deploy-public https://FWGS-deployer:${GH_TOKEN}@github.com/FWGS/xash3d-deploy.git
|
git remote add travis-deploy-public https://FWGS-deployer:${GH_TOKEN}@github.com/FWGS/xash3d-deploy.git
|
||||||
git checkout -b $DEPLOY_BRANCH-$TRAVIS_BRANCH
|
git checkout -b $DEPLOY_BRANCH-$TRAVIS_BRANCH
|
||||||
sh yadisk_download.sh $DEPLOY_BRANCH $FILES
|
yadisk_download $FILES
|
||||||
generate_readme
|
generate_readme
|
||||||
git add .
|
git add .
|
||||||
git commit -m "Latest travis deploy $TRAVIS_COMMIT"
|
git commit -m "Latest travis deploy $TRAVIS_COMMIT"
|
||||||
|
@ -1,6 +0,0 @@
|
|||||||
FOLDER_NAME=$DEPLOY_BRANCH-$TRAVIS_BRANCH
|
|
||||||
WEBDAV_SRV=https://$YANDEX_DISK_USER:$YANDEX_DISK_TOKEN@webdav.yandex.ru
|
|
||||||
|
|
||||||
for file in $*; do
|
|
||||||
curl -L $WEBDAV_SRV/$FOLDER_NAME/$file -o $file
|
|
||||||
done
|
|
Loading…
x
Reference in New Issue
Block a user