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"`
|
2018-01-11 10:39:41 +00:00
|
|
|
filebase="/tmp/qb64_${now}_`echo ${TRAVIS_COMMIT} | sed 's/\(.......\).*$/\1/'`-${TRAVIS_BRANCH}"
|
2016-11-10 05:48:00 +00:00
|
|
|
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
|
2018-01-15 12:13:27 +00:00
|
|
|
#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
|
|
|
|