Install Azure DevOps extension for AZ CLI (#5057)

This commit is contained in:
Aleksandr Chebotov
2022-02-11 12:53:36 +03:00
committed by GitHub
parent 8dfa279755
commit cd64c6838e
4 changed files with 15 additions and 0 deletions

View File

@@ -19,6 +19,9 @@ done
# Invoke bazel to download bazel version via bazelisk
bazel
# Install Azure DevOps extension for Azure Command Line Interface
az extension add -n azure-devops
# Workaround https://github.com/actions/virtual-environments/issues/4931
# by making Tcl/Tk paths the same on macOS 10.15 and macOS 11
if is_BigSur; then

View File

@@ -422,6 +422,11 @@ function Get-AzureCLIVersion {
return "Azure CLI $azureCLIVersion"
}
function Get-AzureDevopsVersion {
$azdevopsVersion = (az version | ConvertFrom-Json).extensions.'azure-devops'
return "Azure CLI (azure-devops) $azdevopsVersion"
}
function Get-AWSCLIVersion {
$awsVersion = Run-Command "aws --version" | Take-Part -Part 0 | Take-Part -Delimiter "/" -Part 1
return "AWS CLI $awsVersion"

View File

@@ -155,6 +155,7 @@ $toolsList = @(
(Get-CmakeVersion),
(Get-AppCenterCLIVersion),
(Get-AzureCLIVersion),
(Get-AzureDevopsVersion),
(Get-AWSCLIVersion),
(Get-AWSSAMCLIVersion),
(Get-AWSSessionManagerCLIVersion)

View File

@@ -6,6 +6,12 @@ Describe "Azure CLI" {
}
}
Describe "Azure DevOps CLI" {
It "az devops" {
"az devops -h" | Should -ReturnZeroExitCode
}
}
Describe "Carthage" {
It "Carthage" {
"carthage version" | Should -ReturnZeroExitCode