Fix Publish Delete, ReleaseLease URLs
This commit is contained in:
parent
0bfd94e998
commit
638fcf25fc
1 changed files with 5 additions and 2 deletions
|
@ -69,13 +69,16 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
// at the same time and someone already took care of publishing and we have no work to do.
|
||||
if (AzurePublisherTool.IsLatestSpecifiedVersion(targetVersionFile))
|
||||
{
|
||||
AzurePublisherTool.ReleaseLeaseOnBlob(targetContainer, leaseId);
|
||||
AzurePublisherTool.ReleaseLeaseOnBlob(semaphoreBlob, leaseId);
|
||||
return c.Success();
|
||||
}
|
||||
else
|
||||
{
|
||||
// This is an old drop of latest so remove all old files to ensure a clean state
|
||||
AzurePublisherTool.ListBlobs($"{targetContainer}").ToList().ForEach(f => AzurePublisherTool.TryDeleteBlob(f));
|
||||
AzurePublisherTool.ListBlobs($"{targetContainer}")
|
||||
.Select(s => s.Replace("/dotnet/", ""))
|
||||
.ToList()
|
||||
.ForEach(f => AzurePublisherTool.TryDeleteBlob(f));
|
||||
|
||||
// Drop the version file signaling such for any race-condition builds (see above comment).
|
||||
AzurePublisherTool.DropLatestSpecifiedVersion(targetVersionFile);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue