Compare commits

..

2 Commits

Author SHA1 Message Date
Accelerator1996
0211fbacbf
Merge 707d85cf01 into fd08b9c8dc 2024-07-19 02:51:15 +00:00
lvfei.lv
707d85cf01 Fix the bug about parsing dragonwell version (#642) 2024-07-19 10:51:08 +08:00
2 changed files with 16 additions and 12 deletions

10
dist/setup/index.js vendored
View File

@ -124231,10 +124231,12 @@ class DragonwellDistribution extends base_installer_1.JavaBase {
} }
// Some version of Dragonwell JDK are numerated with help of non-semver notation (more then 3 digits). // Some version of Dragonwell JDK are numerated with help of non-semver notation (more then 3 digits).
// Common practice is to transform excess digits to the so-called semver build part, which is prefixed with the plus sign, to be able to operate with them using semver tools. // Common practice is to transform excess digits to the so-called semver build part, which is prefixed with the plus sign, to be able to operate with them using semver tools.
const jdkVersionNums = jdkVersion if (jdkVersion.split('.').length > 3) {
.replace('+', '.') const jdkVersionNums = jdkVersion
.split('.'); .replace('+', '.')
jdkVersion = (0, util_1.convertVersionToSemver)(`${jdkVersionNums.slice(0, 3).join('.')}.${jdkVersionNums[jdkVersionNums.length - 1]}`); .split('.');
jdkVersion = (0, util_1.convertVersionToSemver)(`${jdkVersionNums.slice(0, 3).join('.')}.${jdkVersionNums[jdkVersionNums.length - 1]}`);
}
for (const edition in archMap) { for (const edition in archMap) {
eligibleVersions.push({ eligibleVersions.push({
os: platform, os: platform,

View File

@ -149,14 +149,16 @@ export class DragonwellDistribution extends JavaBase {
// Some version of Dragonwell JDK are numerated with help of non-semver notation (more then 3 digits). // Some version of Dragonwell JDK are numerated with help of non-semver notation (more then 3 digits).
// Common practice is to transform excess digits to the so-called semver build part, which is prefixed with the plus sign, to be able to operate with them using semver tools. // Common practice is to transform excess digits to the so-called semver build part, which is prefixed with the plus sign, to be able to operate with them using semver tools.
const jdkVersionNums: string[] = jdkVersion if (jdkVersion.split('.').length > 3) {
.replace('+', '.') const jdkVersionNums: string[] = jdkVersion
.split('.'); .replace('+', '.')
jdkVersion = convertVersionToSemver( .split('.');
`${jdkVersionNums.slice(0, 3).join('.')}.${ jdkVersion = convertVersionToSemver(
jdkVersionNums[jdkVersionNums.length - 1] `${jdkVersionNums.slice(0, 3).join('.')}.${
}` jdkVersionNums[jdkVersionNums.length - 1]
); }`
);
}
for (const edition in archMap) { for (const edition in archMap) {
eligibleVersions.push({ eligibleVersions.push({