Skip to content

Commit

Permalink
Merge branch 'master' into devonfw#1112-Version-prefix-not-working-as…
Browse files Browse the repository at this point in the history
…-expected
  • Loading branch information
hohwille authored Jun 2, 2023
2 parents 5cf994b + 0e5f21e commit d272aec
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,7 @@ protected String getTool() {
@Override
protected void addVersion(UrlVersion urlVersion) {

String baseUrl = "https://nodejs.org/dist/v${version}/node-v${version}";
doAddVersion(urlVersion, baseUrl + "-win-x64.zip", WINDOWS, X64, "");
doAddVersion(urlVersion, baseUrl + "-darwin-x64.tar.gz", MAC, X64, "");
doAddVersion(urlVersion, baseUrl + ".pkg", MAC, ARM64, "");
doAddVersion(urlVersion, baseUrl + "-linux-x64.tar.xz", LINUX, X64, "");
doAddVersion(urlVersion,"https://registry.npmjs.org/npm/-/npm-${version}.tgz");
}

@Override
Expand All @@ -34,6 +30,11 @@ protected String getVersionUrl() {
@Override
protected Pattern getVersionPattern() {

return Pattern.compile("(\\d\\.\\d{1,2}\\.\\d+)");
return Pattern.compile("npm-(\\d\\.\\d{1,2}\\.\\d+)");
}
@Override
protected String getVersionPrefixToRemove() {

return "npm-";
}
}

0 comments on commit d272aec

Please sign in to comment.