Files
Daybreak/Scripts/PushFilesToBlobStorage.ps1
T
amacocian b1a7d3a111 Improve update procedure (#496)
* Improve update procedure

* Change release procedure

* Fix gh release

* Fix release tag

* Change release structure to support folders

* Revert zip file changes to make them backwards compatible

* Change path

* Make launcher not contain the entire dependencies

* Add downtime after API rate limit

* Add rate limit checking before create release

* Enumerate through rates

* Adjust rate limit call

* Change to create release as draft

* Add update logic based on azure blobs

* Fix publish

* Create zip

* Disable CD pipeline for prs

* Increment version

* Fix tests
2023-11-22 21:13:01 +01:00

20 lines
824 B
PowerShell

Param(
[Parameter(Mandatory=$true)]
[string]$version,
[Parameter(Mandatory=$true)]
[string]$connectionString,
[Parameter(Mandatory=$true)]
[string]$sourcePath
)
# Create a new blob container
$containerName = "v$($version.ToLower().Replace('.', '-'))" # Container names must be lowercase
Write-Host "Creating container $($containerName)"
az storage container create --name $containerName --connection-string $connectionString
Write-Host "Uploading files"
# Upload all files from the source path to the blob container
az storage blob upload-batch --destination $containerName --source $sourcePath --connection-string $connectionString
Write-Host "Setting public access to container"
az storage container set-permission --name $containerName --public-access blob --connection-string $connectionString