Compare commits

..

2 Commits

Author SHA1 Message Date
Accelerator1996
da4b2ea389
Merge a3c03fb332 into fd08b9c8dc 2024-07-01 09:26:20 +00:00
lvfei.lv
a3c03fb332 Fix the bug about parsing dragonwell version (#642) 2024-07-01 17:16:31 +08:00
2 changed files with 20 additions and 11 deletions

14
dist/setup/index.js vendored
View File

@ -124232,10 +124232,16 @@ 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.
if (jdkVersion.split('.').length > 3) { if (jdkVersion.split('.').length > 3) {
const jdkVersionNums = jdkVersion const jdkVersionNums = jdkVersion.split('.');
.replace('+', '.') const splitedJdkVersionList = jdkVersionNums.slice(0, 3);
.split('.'); if (jdkVersion.includes('+')) {
jdkVersion = (0, util_1.convertVersionToSemver)(`${jdkVersionNums.slice(0, 3).join('.')}.${jdkVersionNums[jdkVersionNums.length - 1]}`); const buildParts = jdkVersion.split('+');
splitedJdkVersionList.push(buildParts[buildParts.length - 1]);
}
else {
splitedJdkVersionList.push(jdkVersionNums[jdkVersionNums.length - 1]);
}
jdkVersion = (0, util_1.convertVersionToSemver)(splitedJdkVersionList.join('.'));
} }
for (const edition in archMap) { for (const edition in archMap) {
eligibleVersions.push({ eligibleVersions.push({

View File

@ -150,15 +150,18 @@ 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.
if (jdkVersion.split('.').length > 3) { if (jdkVersion.split('.').length > 3) {
const jdkVersionNums: string[] = jdkVersion const jdkVersionNums: string[] = jdkVersion.split('.');
.replace('+', '.') const splitedJdkVersionList: string[] = jdkVersionNums.slice(0, 3);
.split('.'); if (jdkVersion.includes('+')) {
jdkVersion = convertVersionToSemver( const buildParts: string[] = jdkVersion.split('+');
`${jdkVersionNums.slice(0, 3).join('.')}.${ splitedJdkVersionList.push(buildParts[buildParts.length - 1]);
} else {
splitedJdkVersionList.push(
jdkVersionNums[jdkVersionNums.length - 1] jdkVersionNums[jdkVersionNums.length - 1]
}`
); );
} }
jdkVersion = convertVersionToSemver(splitedJdkVersionList.join('.'));
}
for (const edition in archMap) { for (const edition in archMap) {
eligibleVersions.push({ eligibleVersions.push({