Skip to content

Commit 10741ad

Browse files
make installation of devon ide versionable
1 parent a31e110 commit 10741ad

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

runners/console/index.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,16 @@ export class Console extends Runner {
3636
let installDir = path.join(this.getWorkingDirectory(), "devonfw");
3737
this.createFolder(installDir, true);
3838

39+
let downloadUrl = "https://bit.ly/2BCkFa9";
40+
if(command.parameters.length > 1 && command.parameters[1] != "") {
41+
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];
42+
}
3943
if(this.platform == ConsolePlatform.WINDOWS) {
40-
this.executeCommandSync("powershell.exe Invoke-WebRequest -OutFile devonfw.tar.gz https://bit.ly/2BCkFa9", installDir, result);
44+
this.executeCommandSync("powershell.exe \"Invoke-WebRequest -OutFile devonfw.tar.gz '" + downloadUrl + "'\"", installDir, result);
4145
this.executeCommandSync("powershell.exe tar -xvzf devonfw.tar.gz", installDir, result);
4246
this.executeCommandSync("powershell.exe ./setup " + path.join(settingsDir, "settings.git").replace(/\\/g, "/"), installDir, result, "yes");
4347
} else {
44-
this.executeCommandSync("wget -c https://bit.ly/2BCkFa9 -O - | tar -xz", installDir, result);
48+
this.executeCommandSync("wget -c \"" + downloadUrl + "\" -O - | tar -xz", installDir, result);
4549
this.executeCommandSync("bash setup " + path.join(settingsDir, "settings.git").replace(/\\/g, "/"), installDir, result, "yes");
4650
}
4751

0 commit comments

Comments
 (0)