1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-01 12:40:36 +00:00

Fix CI errors, set upload file public

This commit is contained in:
Luke Ceddia 2021-12-23 23:13:09 +11:00
parent df07ffa91a
commit 138080f41d
No known key found for this signature in database
GPG key ID: 319344384A0759B0
2 changed files with 10 additions and 4 deletions

View file

@ -1,8 +1,12 @@
$Bucket = "qb64"
$Timestamp = (Get-Date).ToUniversalTime().ToString("yyyy-MM-dd-HH-mm-ss")
$Filename = "qb64_development_win-${Env:PLATFORM}.7z"
$Dirname = "qb64_${Timestamp}_$($Env:GITHUB_SHA.substring(0,7))_win-${Env:PLATFORM}"
# Ideally this would change the directory name to have useful information, but Windows gives an error
# "The process cannot access the file because it is being used by another process.", so this feature
# is disabled until someone can work out a better way.
# $Dirname = "qb64_${Timestamp}_$($Env:GITHUB_SHA.substring(0,7))_win-${Env:PLATFORM}"
# Rename-Item qb64 $Dirname
$Dirname = qb64
Set-Location ..
Rename-Item qb64 $Dirname
7z a "-xr@${Dirname}\.ci\common-exclusion.list" "-xr@${Dirname}\.ci\win-exclusion.list" $Filename $Dirname
aws --endpoint-url ${S3_ENDPOINT} s3 cp $Filename "s3://${Bucket}/development-builds/${Filename}"
aws --endpoint-url ${S3_ENDPOINT} s3api put-object --bucket ${Bucket} --body $Filename --acl public-read --key development-builds/$Filename

View file

@ -8,4 +8,6 @@ dirname="qb64_${now}_`echo ${GITHUB_SHA} | sed 's/\(.......\).*$/\1/'`_${OS}"
cd ..
mv qb64 "${dirname}"
tar --create --auto-compress --file ${filename} --exclude-from=${dirname}/.ci/common-exclusion.list --exclude-from=${dirname}/.ci/$OS-exclusion.list ${dirname}
aws --endpoint-url ${S3_ENDPOINT} s3 cp ${filename} s3://${BUCKET}/development-builds/${filename}
aws --endpoint-url ${S3_ENDPOINT} s3api put-object --bucket ${BUCKET} --body ${filename} --acl public-read --key development-builds/${filename}
# Move it back so the post-job cleanup doesn't complain
mv "${dirname}" qb64