Browse Source

travis: add github releases uploader (#47)

pull/2/head
Alibek Omarov 5 years ago
parent
commit
0366035237
  1. 8
      .travis.yml
  2. 27
      scripts/continious_upload.sh
  3. 7
      scripts/yadisk_upload.sh

8
.travis.yml

@ -47,7 +47,7 @@ jobs:
- sh scripts/build_${TRAVIS_OS_NAME}_engine.sh - sh scripts/build_${TRAVIS_OS_NAME}_engine.sh
after_script: after_script:
- ccache --show-stats - ccache --show-stats
- sh scripts/yadisk_upload.sh Xash3DFWGS-i386.AppImage - sh scripts/continious_upload.sh Xash3DFWGS-i386.AppImage
# - # ... # - # ...
# name: "Build for Windows MinGW" # name: "Build for Windows MinGW"
# cache: ccache # cache: ccache
@ -68,7 +68,7 @@ jobs:
# - sh scripts/build_mingw_engine.sh # - sh scripts/build_mingw_engine.sh
# after_script: # after_script:
# - ccache --show-stats # - ccache --show-stats
# - sh scripts/yadisk_upload.sh xash3d-mingw.7z # - sh scripts/continious_upload.sh xash3d-mingw.7z
- # ... - # ...
name: "Build for OSX" name: "Build for OSX"
cache: ccache cache: ccache
@ -90,9 +90,9 @@ jobs:
script: script:
- sh scripts/build_${TRAVIS_OS_NAME}_engine.sh - sh scripts/build_${TRAVIS_OS_NAME}_engine.sh
after_script: after_script:
- sh scripts/yadisk_upload.sh xash3d-vc.7z xash3d-vc2008-sln.7z - sh scripts/continious_upload.sh xash3d-vc.7z xash3d-vc2008-sln.7z
- stage: deploy - stage: deploy
name: "Deploy to github" name: "Deploy to github repo"
os: linux os: linux
cache: false cache: false
script: script:

27
scripts/continious_upload.sh

@ -0,0 +1,27 @@
##################################
#
# GitHub Releases
#
##################################
set +x
wget -O upload.sh "https://raw.githubusercontent.com/FWGS/uploadtool/master/upload.sh"
chmod +x upload.sh
export GITHUB_TOKEN=$GH_TOKEN
./upload.sh $*
##################################
#
# Yandex.Disk
#
##################################
FOLDER_NAME=$DEPLOY_BRANCH-$TRAVIS_BRANCH
WEBDAV_SRV=https://$YANDEX_DISK_USER:$YANDEX_DISK_TOKEN@webdav.yandex.ru
for file in $*; do
echo "Uploading $file..."
curl -T $file $WEBDAV_SRV/$FOLDER_NAME/$file
done

7
scripts/yadisk_upload.sh

@ -1,7 +0,0 @@
FOLDER_NAME=$DEPLOY_BRANCH-$TRAVIS_BRANCH
WEBDAV_SRV=https://$YANDEX_DISK_USER:$YANDEX_DISK_TOKEN@webdav.yandex.ru
for file in $*; do
echo "Uploading $file..."
curl -T $file $WEBDAV_SRV/$FOLDER_NAME/$file
done
Loading…
Cancel
Save