diff --git a/.ci/deploy.ps1 b/.ci/deploy.ps1 index 2c447911d..94bc401bc 100644 --- a/.ci/deploy.ps1 +++ b/.ci/deploy.ps1 @@ -1,4 +1,4 @@ -$Bucket = "qb64-dev-builds" +$Bucket = "qb64-development-builds" $Timestamp = (Get-Date).ToUniversalTime().ToString("yyyy-MM-dd-HH-mm-ss") $Filename = "qb64_${Timestamp}_$($Env:GITHUB_SHA.substring(0,7))_win-${Env:PLATFORM}.7z" @@ -6,6 +6,8 @@ Set-Location .. 7z a '-xr@qb64\.ci\common-exclusion.list' '-xr@qb64\.ci\win-exclusion.list' $Filename qb64 $OldFiles = aws --output json --query Contents[].Key s3api list-objects --bucket $Bucket --prefix win-$Env:PLATFORM | ConvertFrom-Json aws s3 cp $Filename "s3://${Bucket}/win-${Env:PLATFORM}/" +Set-Content -Path latest.txt -NoNewline -Value $Filename +aws s3 cp latest.txt "s3://${Bucket}/win-${Env:PLATFORM}/" foreach ($f in $OldFiles) { aws s3 rm "s3://$Bucket/$f" -} \ No newline at end of file +} diff --git a/.ci/deploy.sh b/.ci/deploy.sh index f8b1c77cd..78ff60817 100755 --- a/.ci/deploy.sh +++ b/.ci/deploy.sh @@ -2,13 +2,15 @@ OS=$1 TZ=UTC now=`date +"%F-%H-%M-%S"` -BUCKET=qb64-dev-builds +BUCKET=qb64-development-builds filename="/tmp/qb64_${now}_`echo ${GITHUB_SHA} | sed 's/\(.......\).*$/\1/'`_${OS}.tar.gz" cd .. tar --create --auto-compress --file ${filename} --exclude-from=qb64/.ci/common-exclusion.list --exclude-from=qb64/.ci/$OS-exclusion.list qb64 current_files=$(aws --output text --query 'Contents[].Key' s3api list-objects --bucket ${BUCKET} --prefix ${OS}) aws s3 cp ${filename} s3://${BUCKET}/${OS}/ +echo -n $(basename "${filename}") > latest.txt +aws s3 cp latest.txt s3://${BUCKET}/${OS}/ for f in $current_files; do aws s3 rm s3://${BUCKET}/$f done