Skip to content

Commit

Permalink
#1177: Azure installation with MSI extraction (#1190)
Browse files Browse the repository at this point in the history
  • Loading branch information
alfeilex authored Jun 22, 2023
1 parent ad3a300 commit 684740d
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 11 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ This file documents all notable changes to https://github.com/devonfw/ide[devonf

Release with new features and bugfixes:

* https://github.com/devonfw/ide/issues/1177[#1177]: Azure installation with MSI
* https://github.com/devonfw/ide/issues/1147[#1147]: Separates plugins from software folder
* https://github.com/devonfw/ide/issues/1158[#1158]: Projects main-branch is always checked out
* https://github.com/devonfw/ide/issues/1118[#1118]: Add milestone versions of Eclipse
Expand Down
2 changes: 1 addition & 1 deletion documentation/az.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The Azure CLI commandlet allows to install and use https://github.com/Azure/azur
Call `devon az «args»` is more or less the same as calling `az «args»` but with some advanced features and ensuring that Azure CLI is properly set up for your project.

*ATTENTION:*
Currently this feature is new and therefore experimental.
Currently this feature is new and therefore experimental. It only works on windows.
It may change in incompatible ways in the next releases until we reach a stable state.
We hope that all is working fine for you.
However, do not expect everything to work out of the box.
Expand Down
30 changes: 20 additions & 10 deletions scripts/src/main/resources/scripts/command/az
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,30 @@ then
fi
# shellcheck source=scripts/functions
source "$(dirname "${0}")"/../functions
TOOL_VERSION_COMMAND="az -v"
AZ_HOME="${DEVON_IDE_HOME}/software/az"
AZ_RUN="${AZ_HOME}/bin/az"
TOOL_VERSION_COMMAND="${AZ_RUN} -v"
# shellcheck source=scripts/commandlet-cli
source "$(dirname "${0}")"/../commandlet-cli

function doSetup() {
if [ "${1}" != "silent" ] || [[ ! $(command -v az) =~ ${DEVON_IDE_HOME}/software/ ]]
if doIsWindows
then
doDevonCommand pip install azure-cli az
setConfig
fi
if [ "${1}" != "silent" ] && ! doIsQuiet
then
doRunCommand "${TOOL_VERSION_COMMAND}" "verify installation of azure cli"
TOOL_VERSION_COMMAND="-"
doInstall "az" "${AZ_VERSION}" "${1}" "" "${AZ_HOME}"
ERR="${?}"
if [ "${ERR}" == 0 ]
then
setConfig
doRunCommand "cmd //c 'mklink /d /j $(cygpath -w "${AZ_HOME}/bin") $(cygpath -w "${AZ_HOME}/wbin")'"
if [ "${1}" != "silent" ] && ! doIsQuiet
then
TOOL_VERSION_COMMAND="${AZ_RUN} -v"
doRunCommand "${TOOL_VERSION_COMMAND}" "verify installation of az"
fi
fi
else
doWarning "Your operating system is unsupported!"
fi
}

Expand All @@ -40,8 +51,7 @@ function setConfig() {

function doRun() {
doSetup silent
doEcho "Running: az ${*}"
az "${@}"
doRunCommand "${AZ_RUN} ${*}"
}

case ${1} in
Expand Down

0 comments on commit 684740d

Please sign in to comment.