Skip to content

Commit

Permalink
Merge branch 'master' into feature/devonfw#1030-Rancher-Desktop-Insta…
Browse files Browse the repository at this point in the history
…llation-not-detected---ide-is-trying-to-install
  • Loading branch information
hohwille authored Feb 13, 2023
2 parents 9562325 + 7165d8c commit f45eff4
Show file tree
Hide file tree
Showing 12 changed files with 48 additions and 28 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ jobs:
sed -i "s/${current_version}/${next_version}/" .mvn/maven.config
git add -f .mvn/maven.config
git commit -m "set next version to ${next_version}"
# prevent GH006 error when pushing to protected branch
git remote set-url origin github.com/devonfw/ide.git
git push
git push --tags
noDotVersion="${current_version//.}"
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/test-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ jobs:
uses: actions/setup-java@v1
with:
java-version: '11'
- name: Set up shellcheck
run: |
scversion="latest"
wget -qO- "https://github.com/koalaman/shellcheck/releases/download/${scversion?}/shellcheck-${scversion?}.linux.x86_64.tar.xz" | tar -xJv
sudo cp "shellcheck-${scversion}/shellcheck" /usr/bin/
- name: Build project with Maven
run: |
export INTEGRATION_TEST=true
Expand Down
2 changes: 1 addition & 1 deletion .mvn/maven.config
Original file line number Diff line number Diff line change
@@ -1 +1 @@
-Drevision=2023.01.001-SNAPSHOT
-Drevision=2023.02.001-SNAPSHOT
9 changes: 9 additions & 0 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

This file documents all notable changes to https://github.com/devonfw/ide[devonfw-ide].

== 2023.02.001

Release with new features and bugfixes:

* https://github.com/devonfw/ide/issues/1052[#1052]: Fix leading spaces on MacOS
* https://github.com/devonfw/ide/issues/1022[#1022]: suppress confusing windows process result messages like The operation completed successfully.

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

== 2023.01.001

Release with new features and bugfixes:
Expand Down
2 changes: 1 addition & 1 deletion README.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ sudo yum install git-core curl
(You can find all Releases in https://repo.maven.apache.org/maven2/com/devonfw/tools/ide/devonfw-ide-scripts/[Maven Central])
** Run the `setup` in this folder (On Windows you can double click on `setup.bat`)
+
A command prompt will open and the setup will start. When the setup is asking for a settings url, you can just press enter to use the default settings.
A command prompt will open and the setup will start. The setup will ask for a settings URL. In case you do not have a settings URL for your project, you can just press enter to use the default settings.
** After the setup is finished, you can close the command prompt and open a new one.
** *You are done! You can now use the `devon` command in your terminal to use the devonfw-ide.*

Expand Down
2 changes: 1 addition & 1 deletion scripts/src/main/resources/scripts/command/eclipse
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ function doConfigureEclipse() {
fi
if [ -n "${mode}" ]
then
doConfigureWorkspace "${SETTINGS_PATH}/eclipse/workspace" "${WORKSPACE_PATH}" ${mode}
doConfigureWorkspace "${SETTINGS_PATH}/eclipse/workspace" "${WORKSPACE_PATH}" "${mode}"
fi
}

Expand Down
2 changes: 1 addition & 1 deletion scripts/src/main/resources/scripts/command/intellij
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ function doConfigureIntellij() {
fi
if [ -n "${mode}" ]
then
doConfigureWorkspace "${SETTINGS_PATH}/intellij/workspace" "${WORKSPACE_PATH}" ${mode}
doConfigureWorkspace "${SETTINGS_PATH}/intellij/workspace" "${WORKSPACE_PATH}" "${mode}"
fi
}

Expand Down
1 change: 0 additions & 1 deletion scripts/src/main/resources/scripts/command/mvn
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,6 @@ function doSetPomVersion() {
if [ "${?}" != 0 ] && doIsDevVersion "${maven_project_version}"
then
doFail "Version ${2} not found in POM ${PWD}/pom.xml\nCurrent version detected as ${maven_project_version} and target version is ${1}"
exit 255
fi
if [[ "${pom_elements}" == *$'\n'* ]]
then
Expand Down
8 changes: 6 additions & 2 deletions scripts/src/main/resources/scripts/devon
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ then
# shellcheck disable=SC2007,SC2154
echo "$[devon_ide_version]"
return 0 2>/dev/null
# can only `return' from a function or sourced script
# shellcheck disable=SC2317
exit 0
fi

Expand Down Expand Up @@ -174,5 +176,7 @@ then
result=255
fi
fi
return ${result} 2>/dev/null
exit ${result}
return "${result}" 2>/dev/null
# can only `return' from a function or sourced script
# shellcheck disable=SC2317
exit "${result}"
18 changes: 9 additions & 9 deletions scripts/src/main/resources/scripts/functions
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ function doRunCommand() {
then
popd > /dev/null || exit 255
fi
doResult "${message}" ${result}
doResult "${message}" "${result}"
}

function doIsForce() {
Expand Down Expand Up @@ -579,9 +579,9 @@ function doDownload() {
result=${?}
if [ "${result}" = 0 ] || [ "${result}" = 255 ]
then
return ${result}
return "${result}"
fi
doFail "Failed to download ${filename} from ${1}" ${result}
doFail "Failed to download ${filename} from ${1}" "${result}"
fi
}

Expand Down Expand Up @@ -836,7 +836,7 @@ function doReplaceExtractedSkipSingleFolder() {
if [ "${#*}" = 1 ] && [ "${1%.app}" = "${1}" ] && [ -d "${1}" ]
then
files="$(find "${dir}" -maxdepth 1 -mindepth 1 -exec basename {} \;)"
anz_files="$(echo "${files}" | wc -w)"
anz_files="$(echo "${files}" | awk 'END{print NR}')"
while [ "${anz_files}" == "1" ]
do
if [ -d "${dir}/${files}" ] && [ "${files}" != "bin" ] && [ "${files%.app}" = "${files}" ]
Expand All @@ -846,7 +846,7 @@ function doReplaceExtractedSkipSingleFolder() {
break
fi
files="$(find "${dir}" -maxdepth 1 -mindepth 1 -exec basename {} \;)"
anz_files="$(echo "${files}" | wc -w)"
anz_files="$(echo "${files}" | awk 'END{print NR}')"
done
source_dir="${dir}"
doDebug "Changing source directory from ${root_dir} to ${source_dir} due to single folder."
Expand Down Expand Up @@ -1527,10 +1527,10 @@ function doVersionCompare() {
then
n2=0
fi
if [ ${n1} -gt ${n2} ]
if [ "${n1}" -gt "${n2}" ]
then
return 1
elif [ ${n1} -lt ${n2} ]
elif [ "${n1}" -lt "${n2}" ]
then
return 2
else
Expand Down Expand Up @@ -1559,10 +1559,10 @@ function doVersionCompare() {
then
n2=0
fi
if [ ${n1} -gt ${n2} ]
if [ "${n1}" -gt "${n2}" ]
then
return 1
elif [ ${n1} -lt ${n2} ]
elif [ "${n1}" -lt "${n2}" ]
then
return 2
fi
Expand Down
19 changes: 10 additions & 9 deletions scripts/src/main/resources/setup.bat
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,23 @@ if "%ERRORLEVEL%" == "0" (
pushd %~dp0
echo Setting up your devonfw-ide in %CD%
call scripts\devon.bat ide setup %*
if %ERRORLEVEL% neq 0 (
if %ERRORLEVEL% neq 0 (
echo Error occurred while running devon.bat ide setup.
exit /b %ERRORLEVEL%
)
reg import system/windows/cmd/devon-cmd.reg
reg import system/windows/power-shell/devon-power-shell.reg
reg import system/windows/cmd/devon-cmd.reg >nul 2>&1
reg import system/windows/power-shell/devon-power-shell.reg >nul 2>&1

dir %USERPROFILE%\AppData\Local\Microsoft\WindowsApps\wt.exe >NUL 2>NUL
if "%ERRORLEVEL%" == "0" (
reg import system/windows/windows-terminal/devon-wt-cmd.reg
reg import system/windows/windows-terminal/devon-wt-gitbash.reg
reg import system/windows/windows-terminal/devon-wt-ps.reg
reg import system/windows/windows-terminal/devon-wt-cmd.reg >nul 2>&1
reg import system/windows/windows-terminal/devon-wt-gitbash.reg >nul 2>&1
reg import system/windows/windows-terminal/devon-wt-ps.reg >nul 2>&1
)

for /F "usebackq tokens=2*" %%O in (`call "%SystemRoot%"\system32\reg.exe query "HKLM\Software\Cygwin\setup" /v "rootdir" 2^>nul ^| "%SystemRoot%\system32\findstr.exe" REG_SZ`) do set CYGWIN_HOME=%%P
for /F "usebackq tokens=2*" %%O in (call "%SystemRoot%"\system32\reg.exe query "HKLM\Software\Cygwin\setup" /v "rootdir" 2^>nul ^| "%SystemRoot%\system32\findstr.exe" REG_SZ) do set CYGWIN_HOME=%%P
if exist "%CYGWIN_HOME%\bin\bash.exe" (
reg import system/windows/cygwin/devon-cygwin.reg
reg import system/windows/cygwin/devon-cygwin.reg >nul 2>&1
"%CYGWIN_HOME%\bin\bash.exe" -l -c "cd \"%CD%\";./scripts/devon"
)

Expand All @@ -39,4 +40,4 @@ if not "%1%" == "-b" (
pause
)

popd
popd
6 changes: 3 additions & 3 deletions scripts/src/test/bash/integration-test-custom-tools
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ CLI="${PWD}/scripts/devon"
REPO_URL="https://repo1.maven.org/maven2/com/palantir/launching"
TOOL_A="go-init"
TOOL_VERSION_A="1.22.0"
TOOL_PATH_A="${PWD}/software/${TOOL_A}/service/bin/darwin-amd64/${TOOL_A}"
TOOL_PATH_A="${PWD}/software/${TOOL_A}/bin/darwin-amd64/${TOOL_A}"
TOOL_B="go-java-launcher"
TOOL_VERSION_B="1.34.0"
TOOL_PATH_B="${PWD}/software/${TOOL_B}/service/bin/darwin-amd64/${TOOL_B}"
TOOL_PATH_B="${PWD}/software/${TOOL_B}/bin/darwin-amd64/${TOOL_B}"
CUSTOM_TOOLS="DEVON_IDE_CUSTOM_TOOLS=(${TOOL_A}:${TOOL_VERSION_A}:all:${REPO_URL} ${TOOL_B}:${TOOL_VERSION_B}:all:)"

echo -e "\n${CUSTOM_TOOLS}" >> "${PWD}/settings/devon.properties"
"${CLI}" ide update

[[ -f "${TOOL_PATH_A}" && -f "${TOOL_PATH_B}" ]]
exit ${?}
exit ${?}

0 comments on commit f45eff4

Please sign in to comment.