Add better error handling in Prepare-Release (#2233)
Co-authored-by: Wes Haggard <Wes.Haggard@microsoft.com>
This commit is contained in:
parent
2b169ca777
commit
5e6d4be92c
@ -136,6 +136,11 @@ if ($null -eq $newVersionParsed)
|
||||
-packageType $packageProperties.SDKType `
|
||||
-packageNewLibrary $packageProperties.IsNewSDK
|
||||
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Error "Updating of the Devops Release WorkItem failed."
|
||||
exit 1
|
||||
}
|
||||
|
||||
if ($releaseTrackingOnly)
|
||||
{
|
||||
Write-Host
|
||||
|
||||
@ -19,11 +19,17 @@ param(
|
||||
Set-StrictMode -Version 3
|
||||
|
||||
if (!(Get-Command az -ErrorAction SilentlyContinue)) {
|
||||
Write-Host 'You must have the Azure CLI installed: https://aka.ms/azure-cli'
|
||||
Write-Error 'You must have the Azure CLI installed: https://aka.ms/azure-cli'
|
||||
exit 1
|
||||
}
|
||||
|
||||
az extension show -n azure-devops > $null
|
||||
az account show *> $null
|
||||
if (!$?) {
|
||||
Write-Host 'Running az login...'
|
||||
az login *> $null
|
||||
}
|
||||
|
||||
az extension show -n azure-devops *> $null
|
||||
if (!$?){
|
||||
Write-Host 'Installing azure-devops extension'
|
||||
az extension add --name azure-devops
|
||||
|
||||
Loading…
Reference in New Issue
Block a user