Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release/v7.5] Delete the msix blob if it's already there #24516

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .pipelines/templates/release-create-msix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,14 @@ jobs:
if ($env:BundleDir) {
$bundleFile = Get-Item "$env:BundleDir\*.msixbundle"
$blobName = $bundleFile | Split-Path -Leaf
$existing = Get-AzStorageBlob -Container $containerName -Blob $blobName -Context $storageContext -ErrorAction Ignore
if ($existing) {
Write-Verbose -Verbose "MSIX bundle already exists at '$storageAccount/$containerName/$blobName', removing first."
$existingBlob | Remove-AzStorageBlob -ErrorAction Stop -Verbose
}
Write-Verbose -Verbose "Uploading $bundleFile to $containerName/$blobName"
Set-AzStorageBlobContent -File $bundleFile -Container $containerName -Blob $blobName -Context $storageContext
Set-AzStorageBlobContent -File $bundleFile -Container $containerName -Blob $blobName -Context $storageContext -Force
}
else{
throw "BundleDir not found"
Expand Down