2020-01-04 13:40:05 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2020-01-06 07:40:15 +00:00
|
|
|
OS=$1
|
2020-01-04 13:40:05 +00:00
|
|
|
TZ=UTC now=`date +"%F-%H-%M-%S"`
|
2021-12-23 11:38:03 +00:00
|
|
|
BUCKET=qb64
|
|
|
|
filename="qb64_development_${OS}.tar.gz"
|
|
|
|
dirname="qb64_${now}_`echo ${GITHUB_SHA} | sed 's/\(.......\).*$/\1/'`_${OS}"
|
2020-01-04 13:40:05 +00:00
|
|
|
cd ..
|
2021-12-23 11:38:03 +00:00
|
|
|
mv qb64 "${dirname}"
|
|
|
|
tar --create --auto-compress --file ${filename} --exclude-from=${dirname}/.ci/common-exclusion.list --exclude-from=${dirname}/.ci/$OS-exclusion.list ${dirname}
|
2021-12-23 12:13:09 +00:00
|
|
|
aws --endpoint-url ${S3_ENDPOINT} s3api put-object --bucket ${BUCKET} --body ${filename} --acl public-read --key development-builds/${filename}
|
2021-12-23 12:37:59 +00:00
|
|
|
if [[ $OS == lnx ]]; then
|
|
|
|
aws --endpoint-url ${S3_ENDPOINT} s3api put-object --bucket ${BUCKET} --body ${dirname}/CHANGELOG.md --acl public-read --key development-builds/changelog.md
|
|
|
|
fi
|
2021-12-23 12:13:09 +00:00
|
|
|
# Move it back so the post-job cleanup doesn't complain
|
|
|
|
mv "${dirname}" qb64
|