mirror of
https://github.com/actions/setup-java.git
synced 2025-04-21 10:26:46 +00:00
Add unit test
This commit is contained in:
parent
0a93947425
commit
d88ee5c3dc
3 changed files with 21 additions and 2 deletions
2
dist/setup/index.js
vendored
2
dist/setup/index.js
vendored
|
@ -104298,10 +104298,10 @@ class CorrettoDistribution extends base_installer_1.JavaBase {
|
|||
return match[1];
|
||||
}
|
||||
convertVersionToSemver(version) {
|
||||
// corretto uses 5 digit semver-like notation e.g. 17.0.6.10.1
|
||||
const versionArray = version.split('.');
|
||||
const mainVersion = versionArray.slice(0, 3).join('.');
|
||||
if (versionArray.length > 3) {
|
||||
// intentionally ignore more than 4 numbers because it is invalid semver
|
||||
return `${mainVersion}+${versionArray.slice(3).join('.')}`;
|
||||
}
|
||||
return mainVersion;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue