Skip to content

Commit

Permalink
#1098: workaround fix for devon node version set (#1108)
Browse files Browse the repository at this point in the history
  • Loading branch information
hohwille authored Apr 14, 2023
1 parent edc7178 commit d8072ef
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Release with new features and bugfixes:
* https://github.com/devonfw/ide/issues/1080[#1080]: auto-configure IntelliJ core settings
* https://github.com/devonfw/ide/issues/1104[#1104]: IntelliJ plugin installation not working
* https://github.com/devonfw/ide/issues/1099[#1099]: progress output when project is cloned
* https://github.com/devonfw/ide/issues/1098[#1098]: devon node version set buggy

The full list of changes for this release can be found in https://github.com/devonfw/ide/milestone/43?closed=1[milestone 2023.04.001].

Expand Down
13 changes: 9 additions & 4 deletions scripts/src/main/resources/scripts/functions
Original file line number Diff line number Diff line change
Expand Up @@ -1838,13 +1838,18 @@ function doSetSoftwareVersion() {
doUpdateMirrors
version="$(head -n 1 "${DEVON_IDE_HOME}/mirrors/${software}/available-versions")"
fi
local software_version_variable
software_version_variable="$(echo "${software}" | awk '{print toupper($0)}')_VERSION"
local software_version_variable="${software}"
# temporary workaround for #1098 should be fixed and removed with #1085
if [ "${software_version_variable}" = "nodejs" ]
then
software_version_variable="node"
fi
software_version_variable="$(echo "${software_version_variable}" | awk '{print toupper($0)}')_VERSION"
local devon_properties="${DEVON_IDE_HOME}/settings/devon.properties"
grep -v "${software_version_variable}" "${devon_properties}" > "${devon_properties}.tmp"
mv "${devon_properties}.tmp" "${devon_properties}"
echo "${software_version_variable}=\"${version}\"" >> "${devon_properties}"
doEchoInteraction "${software_version_variable}=\"${version}\" has been set in ${devon_properties}\nTo install that version call the following command:\ndevon ${commandlet} setup"
echo "${software_version_variable}=${version}" >> "${devon_properties}"
doEchoInteraction "${software_version_variable}=${version} has been set in ${devon_properties}\nTo install that version call the following command:\ndevon ${commandlet} setup"
else
doError "You have to specify the version you want to set."
fi
Expand Down

0 comments on commit d8072ef

Please sign in to comment.