From 10741add4d46eb62b323158e51523bf68ccc6845 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20G=C3=BCnther?= Date: Tue, 8 Dec 2020 15:59:54 +0100 Subject: [PATCH 1/2] make installation of devon ide versionable --- runners/console/index.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/runners/console/index.ts b/runners/console/index.ts index bb1219db..b5c09265 100644 --- a/runners/console/index.ts +++ b/runners/console/index.ts @@ -36,12 +36,16 @@ export class Console extends Runner { let installDir = path.join(this.getWorkingDirectory(), "devonfw"); this.createFolder(installDir, true); + let downloadUrl = "https://bit.ly/2BCkFa9"; + if(command.parameters.length > 1 && command.parameters[1] != "") { + downloadUrl = "https://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=com.devonfw.tools.ide&a=devonfw-ide-scripts&p=tar.gz&v=" + command.parameters[1]; + } if(this.platform == ConsolePlatform.WINDOWS) { - this.executeCommandSync("powershell.exe Invoke-WebRequest -OutFile devonfw.tar.gz https://bit.ly/2BCkFa9", installDir, result); + this.executeCommandSync("powershell.exe \"Invoke-WebRequest -OutFile devonfw.tar.gz '" + downloadUrl + "'\"", installDir, result); this.executeCommandSync("powershell.exe tar -xvzf devonfw.tar.gz", installDir, result); this.executeCommandSync("powershell.exe ./setup " + path.join(settingsDir, "settings.git").replace(/\\/g, "/"), installDir, result, "yes"); } else { - this.executeCommandSync("wget -c https://bit.ly/2BCkFa9 -O - | tar -xz", installDir, result); + this.executeCommandSync("wget -c \"" + downloadUrl + "\" -O - | tar -xz", installDir, result); this.executeCommandSync("bash setup " + path.join(settingsDir, "settings.git").replace(/\\/g, "/"), installDir, result, "yes"); } From 99f18dd910cc1d2cca3a5318528b777bf8e8446f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20G=C3=BCnther?= Date: Wed, 9 Dec 2020 10:18:31 +0100 Subject: [PATCH 2/2] added second parameter for installDevonfwIde in documentation --- documentation/Functions.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/documentation/Functions.md b/documentation/Functions.md index 9ef2396e..e5aa9c5e 100644 --- a/documentation/Functions.md +++ b/documentation/Functions.md @@ -7,11 +7,12 @@ The following functions are already implemented: *** -### installDevonIde +### installDevonfwIde #### parameter 1. The tools you want to install within the devonfw ide: string array +2. Optional: The version of the ide to install #### example -installDevonfwIde(["java","mvn"]) +installDevonfwIde(["java","mvn"], "2020.08.001") ***