use toolset to install az module

This commit is contained in:
Aleksandr Chebotov
2020-11-02 14:22:07 +03:00
parent a6cd71cfda
commit c66d9d4e72
2 changed files with 10 additions and 6 deletions

View File

@@ -8,12 +8,8 @@
source $HELPER_SCRIPTS/os.sh source $HELPER_SCRIPTS/os.sh
# List of versions # List of versions
if isUbuntu20 ; then toolset="$INSTALLER_SCRIPT_FOLDER/toolset.json"
versions=$(pwsh -Command '(Find-Module -Name Az).Version') versions=$(jq -r '.azureModules[] | select(.name | contains("az")) | .versions[]' $toolset)
else
toolset="$INSTALLER_SCRIPT_FOLDER/toolset.json"
versions=$(jq -r '.azureModules[] | select(.name | contains("az")) | .versions[]' $toolset)
fi
# Try to install and update PowerShellGet before the actual installation # Try to install and update PowerShellGet before the actual installation
pwsh -Command "Install-Module -Name PowerShellGet -Force" pwsh -Command "Install-Module -Name PowerShellGet -Force"

View File

@@ -69,6 +69,14 @@
{"name": "MarkdownPS"}, {"name": "MarkdownPS"},
{"name": "Pester"} {"name": "Pester"}
], ],
"azureModules": [
{
"name": "az",
"versions": [
"4.7.0"
]
}
],
"apt": { "apt": {
"common_packages": [ "common_packages": [
"dbus", "dbus",