mirror of
https://github.com/actions/setup-java.git
synced 2026-08-19 12:12:51 +00:00
Add Red Hat Build of OpenJDK support (#1241)
* Add Red Hat Build of OpenJDK support Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Fix Red Hat tests on Windows Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Update compiled Red Hat distribution Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
co-authored by
Copilot App
Copilot Autofix powered by AI
parent
5f75b27283
commit
416c6d1e8a
Vendored
+25
-2
@@ -30915,6 +30915,7 @@ var JavaDistribution;
|
||||
JavaDistribution["JetBrains"] = "jetbrains";
|
||||
JavaDistribution["Kona"] = "kona";
|
||||
JavaDistribution["OracleOpenJdk"] = "oracle-openjdk";
|
||||
JavaDistribution["RedHat"] = "redhat";
|
||||
})(JavaDistribution || (JavaDistribution = {}));
|
||||
const JAVA_PACKAGE_CAPABILITIES = {
|
||||
[JavaDistribution.Temurin]: ['jdk', 'jre', 'jdk+jmods'],
|
||||
@@ -30946,7 +30947,8 @@ const JAVA_PACKAGE_CAPABILITIES = {
|
||||
'jre+ft'
|
||||
],
|
||||
[JavaDistribution.Kona]: ['jdk'],
|
||||
[JavaDistribution.OracleOpenJdk]: ['jdk']
|
||||
[JavaDistribution.OracleOpenJdk]: ['jdk'],
|
||||
[JavaDistribution.RedHat]: ['jdk', 'jre']
|
||||
};
|
||||
function validateJavaPackage(distributionName, packageType, version) {
|
||||
if (!isJavaDistribution(distributionName)) {
|
||||
@@ -31131,6 +31133,19 @@ const JAVA_PLATFORM_CAPABILITIES = {
|
||||
macos: X64_ARM64,
|
||||
windows: ['x64']
|
||||
}
|
||||
},
|
||||
[_package_types_js__WEBPACK_IMPORTED_MODULE_2__/* .JavaDistribution */ .zS.RedHat]: {
|
||||
platforms: {
|
||||
linux: [
|
||||
'x64',
|
||||
{ architecture: 'aarch64', versionRange: '<12' },
|
||||
{ architecture: 'ppc64le', versionRange: '<12' }
|
||||
],
|
||||
windows: [
|
||||
{ architecture: 'x64', versionRange: '<22' },
|
||||
{ architecture: 'x86', versionRange: '<11' }
|
||||
]
|
||||
}
|
||||
}
|
||||
};
|
||||
const ARCHITECTURE_ALIASES = {
|
||||
@@ -31346,7 +31361,9 @@ async function extractJdkFile(toolPath, extension) {
|
||||
if (!extension) {
|
||||
extension = toolPath.endsWith('.tar.gz')
|
||||
? 'tar.gz'
|
||||
: path__WEBPACK_IMPORTED_MODULE_1___default().extname(toolPath);
|
||||
: toolPath.endsWith('.tar.xz')
|
||||
? 'tar.xz'
|
||||
: path__WEBPACK_IMPORTED_MODULE_1___default().extname(toolPath);
|
||||
if (extension.startsWith('.')) {
|
||||
extension = extension.substring(1);
|
||||
}
|
||||
@@ -31354,6 +31371,8 @@ async function extractJdkFile(toolPath, extension) {
|
||||
switch (extension) {
|
||||
case 'tar.gz':
|
||||
return await extractTarGz(toolPath);
|
||||
case 'tar.xz':
|
||||
return await _actions_tool_cache__WEBPACK_IMPORTED_MODULE_5__/* .extractTar */ .nN(toolPath, undefined, 'xJ');
|
||||
case 'tar':
|
||||
return await _actions_tool_cache__WEBPACK_IMPORTED_MODULE_5__/* .extractTar */ .nN(toolPath);
|
||||
case 'zip':
|
||||
@@ -36309,6 +36328,10 @@ async function getJavaDistribution(distributionName, installerOptions, jdkFile)
|
||||
const { OpenJdkDistribution } = await Promise.all(/* import() */[__nccwpck_require__.e(242), __nccwpck_require__.e(735)]).then(__nccwpck_require__.bind(__nccwpck_require__, 3735));
|
||||
return new OpenJdkDistribution(normalizedInstallerOptions);
|
||||
}
|
||||
case package_types/* JavaDistribution */.zS.RedHat: {
|
||||
const { RedHatDistribution } = await Promise.all(/* import() */[__nccwpck_require__.e(242), __nccwpck_require__.e(228)]).then(__nccwpck_require__.bind(__nccwpck_require__, 8228));
|
||||
return new RedHatDistribution(normalizedInstallerOptions);
|
||||
}
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user