mirror of
https://github.com/QB64Official/qb64.git
synced 2024-07-05 17:00:26 +00:00
Publish latest version name
This commit is contained in:
parent
9deb6e4cf2
commit
223e250c82
|
@ -1,4 +1,4 @@
|
||||||
$Bucket = "qb64-dev-builds"
|
$Bucket = "qb64-development-builds"
|
||||||
$Timestamp = (Get-Date).ToUniversalTime().ToString("yyyy-MM-dd-HH-mm-ss")
|
$Timestamp = (Get-Date).ToUniversalTime().ToString("yyyy-MM-dd-HH-mm-ss")
|
||||||
$Filename = "qb64_${Timestamp}_$($Env:GITHUB_SHA.substring(0,7))_win-${Env:PLATFORM}.7z"
|
$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
|
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
|
$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}/"
|
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) {
|
foreach ($f in $OldFiles) {
|
||||||
aws s3 rm "s3://$Bucket/$f"
|
aws s3 rm "s3://$Bucket/$f"
|
||||||
}
|
}
|
|
@ -2,13 +2,15 @@
|
||||||
|
|
||||||
OS=$1
|
OS=$1
|
||||||
TZ=UTC now=`date +"%F-%H-%M-%S"`
|
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"
|
filename="/tmp/qb64_${now}_`echo ${GITHUB_SHA} | sed 's/\(.......\).*$/\1/'`_${OS}.tar.gz"
|
||||||
cd ..
|
cd ..
|
||||||
tar --create --auto-compress --file ${filename} --exclude-from=qb64/.ci/common-exclusion.list --exclude-from=qb64/.ci/$OS-exclusion.list qb64
|
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})
|
current_files=$(aws --output text --query 'Contents[].Key' s3api list-objects --bucket ${BUCKET} --prefix ${OS})
|
||||||
aws s3 cp ${filename} s3://${BUCKET}/${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
|
for f in $current_files; do
|
||||||
aws s3 rm s3://${BUCKET}/$f
|
aws s3 rm s3://${BUCKET}/$f
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue