mirror of
https://github.com/actions/setup-java.git
synced 2026-07-28 07:04:32 +02:00
Build force-download action bundles
This commit is contained in:
Vendored
+1
@@ -97311,6 +97311,7 @@ const INPUT_DISTRIBUTION = 'distribution';
|
|||||||
const INPUT_JDK_FILE = 'jdk-file';
|
const INPUT_JDK_FILE = 'jdk-file';
|
||||||
const INPUT_JDK_FILE_DEPRECATED = 'jdkFile';
|
const INPUT_JDK_FILE_DEPRECATED = 'jdkFile';
|
||||||
const INPUT_CHECK_LATEST = 'check-latest';
|
const INPUT_CHECK_LATEST = 'check-latest';
|
||||||
|
const INPUT_FORCE_DOWNLOAD = 'force-download';
|
||||||
const INPUT_SET_DEFAULT = 'set-default';
|
const INPUT_SET_DEFAULT = 'set-default';
|
||||||
const INPUT_PROBLEM_MATCHER = 'problem-matcher';
|
const INPUT_PROBLEM_MATCHER = 'problem-matcher';
|
||||||
const INPUT_VERIFY_SIGNATURE = 'verify-signature';
|
const INPUT_VERIFY_SIGNATURE = 'verify-signature';
|
||||||
|
|||||||
Vendored
+12
-4
@@ -72088,6 +72088,7 @@ const INPUT_DISTRIBUTION = 'distribution';
|
|||||||
const INPUT_JDK_FILE = 'jdk-file';
|
const INPUT_JDK_FILE = 'jdk-file';
|
||||||
const INPUT_JDK_FILE_DEPRECATED = 'jdkFile';
|
const INPUT_JDK_FILE_DEPRECATED = 'jdkFile';
|
||||||
const INPUT_CHECK_LATEST = 'check-latest';
|
const INPUT_CHECK_LATEST = 'check-latest';
|
||||||
|
const INPUT_FORCE_DOWNLOAD = 'force-download';
|
||||||
const INPUT_SET_DEFAULT = 'set-default';
|
const INPUT_SET_DEFAULT = 'set-default';
|
||||||
const INPUT_PROBLEM_MATCHER = 'problem-matcher';
|
const INPUT_PROBLEM_MATCHER = 'problem-matcher';
|
||||||
const INPUT_VERIFY_SIGNATURE = 'verify-signature';
|
const INPUT_VERIFY_SIGNATURE = 'verify-signature';
|
||||||
@@ -129290,6 +129291,7 @@ class JavaBase {
|
|||||||
stable;
|
stable;
|
||||||
latest;
|
latest;
|
||||||
checkLatest;
|
checkLatest;
|
||||||
|
forceDownload;
|
||||||
setDefault;
|
setDefault;
|
||||||
verifySignature;
|
verifySignature;
|
||||||
verifySignaturePublicKey;
|
verifySignaturePublicKey;
|
||||||
@@ -129307,6 +129309,7 @@ class JavaBase {
|
|||||||
this.architecture = installerOptions.architecture || external_os_default().arch();
|
this.architecture = installerOptions.architecture || external_os_default().arch();
|
||||||
this.packageType = installerOptions.packageType;
|
this.packageType = installerOptions.packageType;
|
||||||
this.checkLatest = installerOptions.checkLatest;
|
this.checkLatest = installerOptions.checkLatest;
|
||||||
|
this.forceDownload = installerOptions.forceDownload ?? false;
|
||||||
this.setDefault =
|
this.setDefault =
|
||||||
installerOptions.setDefault !== undefined
|
installerOptions.setDefault !== undefined
|
||||||
? installerOptions.setDefault
|
? installerOptions.setDefault
|
||||||
@@ -129318,7 +129321,7 @@ class JavaBase {
|
|||||||
if (this.verifySignature && !this.supportsSignatureVerification()) {
|
if (this.verifySignature && !this.supportsSignatureVerification()) {
|
||||||
throw new Error(`Input 'verify-signature' is not supported for distribution '${this.distribution}'.`);
|
throw new Error(`Input 'verify-signature' is not supported for distribution '${this.distribution}'.`);
|
||||||
}
|
}
|
||||||
let foundJava = this.findInToolcache();
|
let foundJava = this.forceDownload ? null : this.findInToolcache();
|
||||||
if (foundJava && !this.checkLatest && !this.latest) {
|
if (foundJava && !this.checkLatest && !this.latest) {
|
||||||
info(`Resolved Java ${foundJava.version} from tool-cache`);
|
info(`Resolved Java ${foundJava.version} from tool-cache`);
|
||||||
}
|
}
|
||||||
@@ -129342,7 +129345,8 @@ class JavaBase {
|
|||||||
}
|
}
|
||||||
const javaRelease = await this.findPackageForDownload(this.version);
|
const javaRelease = await this.findPackageForDownload(this.version);
|
||||||
info(`Resolved latest version as ${javaRelease.version}`);
|
info(`Resolved latest version as ${javaRelease.version}`);
|
||||||
if (foundJava?.version === javaRelease.version) {
|
if (!this.forceDownload &&
|
||||||
|
foundJava?.version === javaRelease.version) {
|
||||||
info(`Resolved Java ${foundJava.version} from tool-cache`);
|
info(`Resolved Java ${foundJava.version} from tool-cache`);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -129617,7 +129621,7 @@ class LocalDistribution extends JavaBase {
|
|||||||
if (this.latest) {
|
if (this.latest) {
|
||||||
throw new Error("The 'latest' version alias is not supported for the 'jdkfile' distribution. Please specify a concrete version.");
|
throw new Error("The 'latest' version alias is not supported for the 'jdkfile' distribution. Please specify a concrete version.");
|
||||||
}
|
}
|
||||||
let foundJava = this.findInToolcache();
|
let foundJava = this.forceDownload ? null : this.findInToolcache();
|
||||||
if (foundJava) {
|
if (foundJava) {
|
||||||
info(`Resolved Java ${foundJava.version} from tool-cache`);
|
info(`Resolved Java ${foundJava.version} from tool-cache`);
|
||||||
}
|
}
|
||||||
@@ -132037,6 +132041,7 @@ async function run() {
|
|||||||
const cache = getInput(INPUT_CACHE);
|
const cache = getInput(INPUT_CACHE);
|
||||||
const cacheDependencyPath = getInput(INPUT_CACHE_DEPENDENCY_PATH);
|
const cacheDependencyPath = getInput(INPUT_CACHE_DEPENDENCY_PATH);
|
||||||
const checkLatest = util_getBooleanInput(INPUT_CHECK_LATEST, false);
|
const checkLatest = util_getBooleanInput(INPUT_CHECK_LATEST, false);
|
||||||
|
const forceDownload = util_getBooleanInput(INPUT_FORCE_DOWNLOAD, false);
|
||||||
const setDefault = util_getBooleanInput(INPUT_SET_DEFAULT, true);
|
const setDefault = util_getBooleanInput(INPUT_SET_DEFAULT, true);
|
||||||
const verifySignature = util_getBooleanInput(INPUT_VERIFY_SIGNATURE, false);
|
const verifySignature = util_getBooleanInput(INPUT_VERIFY_SIGNATURE, false);
|
||||||
const verifySignaturePublicKey = getInput(INPUT_VERIFY_SIGNATURE_PUBLIC_KEY) || undefined;
|
const verifySignaturePublicKey = getInput(INPUT_VERIFY_SIGNATURE_PUBLIC_KEY) || undefined;
|
||||||
@@ -132068,6 +132073,7 @@ async function run() {
|
|||||||
architecture,
|
architecture,
|
||||||
packageType,
|
packageType,
|
||||||
checkLatest,
|
checkLatest,
|
||||||
|
forceDownload,
|
||||||
setDefault,
|
setDefault,
|
||||||
verifySignature,
|
verifySignature,
|
||||||
verifySignaturePublicKey,
|
verifySignaturePublicKey,
|
||||||
@@ -132086,6 +132092,7 @@ async function run() {
|
|||||||
architecture,
|
architecture,
|
||||||
packageType,
|
packageType,
|
||||||
checkLatest,
|
checkLatest,
|
||||||
|
forceDownload,
|
||||||
setDefault,
|
setDefault,
|
||||||
verifySignature,
|
verifySignature,
|
||||||
verifySignaturePublicKey,
|
verifySignaturePublicKey,
|
||||||
@@ -132120,11 +132127,12 @@ function getJdkFileInput() {
|
|||||||
return jdkFile || deprecatedJdkFile;
|
return jdkFile || deprecatedJdkFile;
|
||||||
}
|
}
|
||||||
async function installVersion(version, options, toolchainId = 0) {
|
async function installVersion(version, options, toolchainId = 0) {
|
||||||
const { distributionName, jdkFile, architecture, packageType, checkLatest, setDefault, verifySignature, verifySignaturePublicKey, toolchainIds } = options;
|
const { distributionName, jdkFile, architecture, packageType, checkLatest, forceDownload, setDefault, verifySignature, verifySignaturePublicKey, toolchainIds } = options;
|
||||||
const installerOptions = {
|
const installerOptions = {
|
||||||
architecture,
|
architecture,
|
||||||
packageType,
|
packageType,
|
||||||
checkLatest,
|
checkLatest,
|
||||||
|
forceDownload,
|
||||||
setDefault,
|
setDefault,
|
||||||
verifySignature,
|
verifySignature,
|
||||||
verifySignaturePublicKey,
|
verifySignaturePublicKey,
|
||||||
|
|||||||
Reference in New Issue
Block a user