devonfw / ide

Tool to automate setup and update of development environment (esp. for Java projects).
Apache License 2.0
35 stars 101 forks source link

#1085 Align tool names in scripts #1095

Closed CREITZ25 closed 1 year ago

CREITZ25 commented 1 year ago

1085 Align tool names in scripts

CREITZ25 commented 1 year ago

@hohwille In order to adjust the cobigen commandlet according to the specifications, the path cobigen-cli must be changed to cobigen. The variable COBIGEN_CLI_HOME should also be adjusted to COBIGEN_HOME. However, the problem arises that the variable is already used in the cobigen environment. Therefore, in the scripts/devon.properties file, the variable COBIGEN_HOME is already set to a configuration file or directory. How do I have to proceed here?

https://github.com/devonfw/cobigen/blob/master/documentation/cobigen-core_configuration.asciidoc

CREITZ25 commented 1 year ago

@hohwille after the issue has been implemented, the doGetToolFolderName function is free of the exceptions and generates the name of the software from the transferred software path. Perhaps the function should be renamed to doGetToolName, or replace the calls directly with the contents of the function.

CREITZ25 commented 1 year ago

node is already adapted

hohwille commented 1 year ago

@hohwille after the issue has been implemented, the doGetToolFolderName function is free of the exceptions and generates the name of the software from the transferred software path. Perhaps the function should be renamed to doGetToolName, or replace the calls directly with the contents of the function.

yes, we should remove this function as it is more or less nothing than basename. so you can change things like

doListSoftwareVersions "$(doGetToolFolderName "${0}")"

to simply

doListSoftwareVersions "${0}"

Theoretically in some cases also a path could be provided as argument where we would need to do ${0/*\//} but I can not find any place where the function is used with a path rather than just the tool name itself.

hohwille commented 1 year ago

node is already adapted

no, you have to change it here: https://github.com/devonfw/ide/blob/7a3dcf75c9c20480cc1e7289d4778f432e062155/scripts/src/main/resources/scripts/command/node#L22