2021-02-03 12:31:10 +00:00
|
|
|
$Bucket = "qb64-development-builds"
|
2021-02-02 11:39:11 +00:00
|
|
|
$Timestamp = (Get-Date).ToUniversalTime().ToString("yyyy-MM-dd-HH-mm-ss")
|
|
|
|
$Filename = "qb64_${Timestamp}_$($Env:GITHUB_SHA.substring(0,7))_win-${Env:PLATFORM}.7z"
|
|
|
|
|
|
|
|
Set-Location ..
|
2021-02-02 11:52:33 +00:00
|
|
|
7z a '-xr@qb64\.ci\common-exclusion.list' '-xr@qb64\.ci\win-exclusion.list' $Filename qb64
|
2021-02-02 11:39:11 +00:00
|
|
|
$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}/"
|
2021-02-03 12:31:10 +00:00
|
|
|
Set-Content -Path latest.txt -NoNewline -Value $Filename
|
2021-02-02 11:39:11 +00:00
|
|
|
foreach ($f in $OldFiles) {
|
|
|
|
aws s3 rm "s3://$Bucket/$f"
|
2021-02-03 12:31:10 +00:00
|
|
|
}
|
2021-02-03 17:26:17 +00:00
|
|
|
aws s3 cp latest.txt "s3://${Bucket}/win-${Env:PLATFORM}/"
|