mirror of
https://github.com/gwdevhub/Daybreak.git
synced 2026-07-21 01:59:49 +00:00
b1a7d3a111
* 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
20 lines
824 B
PowerShell
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 |