1
1
Fork 0
mirror of https://github.com/QB64Official/qb64.git synced 2024-07-02 18:51:21 +00:00
qb64/.ci/deploy.ps1
Fellippe Heitor ef8de59aee Prevents deletion of latest.txt. Also:
Restores case of keywords in qb64.bas.
2021-02-03 14:26:17 -03:00

14 lines
678 B
PowerShell

$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"
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
foreach ($f in $OldFiles) {
aws s3 rm "s3://$Bucket/$f"
}
aws s3 cp latest.txt "s3://${Bucket}/win-${Env:PLATFORM}/"