Skip to content

Commit

Permalink
Fix getting version of aliyun cli. (actions#1150)
Browse files Browse the repository at this point in the history
* Fix getting version of aliyun cli.

It has a version sub command, and --version is used to specify product api version,
not to get version of aliyun cli.

* Change title of aliyun-cli
  • Loading branch information
ideal authored Jul 7, 2020
1 parent bd35954 commit 69f4558
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion images/linux/scripts/installers/aliyun-cli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ if ! command -v aliyun ; then
fi

# Document what was added to the image
aliyun_version="$(aliyun --version | grep "Alibaba Cloud Command Line Interface Version" | cut -d " " -f 7)"
aliyun_version="$(aliyun version)"
echo "Lastly, documenting what we added to the metadata file"
DocumentInstalledItem "Alibaba Cloud CLI ($aliyun_version)"
5 changes: 2 additions & 3 deletions images/win/scripts/SoftwareReport/SoftwareReport.Tools.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,8 @@ function Get-AWSSAMVersion {
}

function Get-AlibabaCLIVersion {
$(aliyun --version | Select-String "Alibaba Cloud Command Line Interface") -match "(?<version>\d+\.\d+\.\d+)" | Out-Null
$alicliVersion = $Matches.Version
return "Alibaba CLI $alicliVersion"
$alicliVersion = $(aliyun version)
return "Alibaba Cloud CLI $alicliVersion"
}

function Get-CloudFoundryVersion {
Expand Down

0 comments on commit 69f4558

Please sign in to comment.