From 138080f41d2add4c3e449b1d13792bdc4fba97ab Mon Sep 17 00:00:00 2001 From: Luke Ceddia Date: Thu, 23 Dec 2021 23:13:09 +1100 Subject: [PATCH] Fix CI errors, set upload file public --- .ci/deploy.ps1 | 10 +++++++--- .ci/deploy.sh | 4 +++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.ci/deploy.ps1 b/.ci/deploy.ps1 index 536854665..4975c9ad6 100644 --- a/.ci/deploy.ps1 +++ b/.ci/deploy.ps1 @@ -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 diff --git a/.ci/deploy.sh b/.ci/deploy.sh index 83e7d35fe..481d35f10 100755 --- a/.ci/deploy.sh +++ b/.ci/deploy.sh @@ -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