1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-05 21:40:25 +00:00
QB64-PE/.travis/deploy.sh

27 lines
1.1 KiB
Bash
Raw Normal View History

2016-11-09 04:23:02 +00:00
#!/bin/sh
2018-01-11 12:11:06 +00:00
if [ "$TRAVIS_OS_NAME" != "linux" ]; then exit; fi
2016-11-09 04:23:02 +00:00
# Prepare archives
# mainversion=`awk '$1=="Version$" {split($3, A, /\"/);print A[2];}' < source/global/version.bas`
# buildnum=`awk '$1=="BuildNum$" {split($3,A, /[\"\/]/); print A[3];}' < source/global/version.bas`
TZ=UTC now=`date +"%F-%H-%M-%S"`
filebase="/tmp/qb64_${now}_`echo ${TRAVIS_COMMIT} | sed 's/\(.......\).*$/\1/'`-${TRAVIS_BRANCH}"
rm -r .dpl
2016-11-09 04:23:02 +00:00
cd ..
tar --create --auto-compress --file ${filebase}_osx.tar.gz --exclude-from=qb64/.travis/common-exclusion.list --exclude-from=qb64/.travis/osx-exclusion.list qb64
tar --create --auto-compress --file ${filebase}_lnx.tar.gz --exclude-from=qb64/.travis/common-exclusion.list --exclude-from=qb64/.travis/lnx-exclusion.list qb64
#7z a -xr@qb64/.travis/common-exclusion.list -xr@qb64/.travis/win-exclusion.list ${filebase}_win.7z qb64/ > /dev/null
2016-11-09 04:23:02 +00:00
# Send to server
2018-01-19 10:15:29 +00:00
# Sometimes the connection can be a bit flakey, so try multiple times on error
for i in `seq 1 10`
do scp ${filebase}_* m6rosupy1q2t@qb64.org:autobuilds/${TRAVIS_BRANCH}/
if [ "$?" -eq 0 ]
2018-01-19 10:42:19 +00:00
then exit 0
2018-01-19 10:15:29 +00:00
fi
2018-01-19 10:42:19 +00:00
echo scp failed
2018-01-19 10:15:29 +00:00
done
2016-11-09 04:23:02 +00:00