From 51e12f8439fb5a741369476edabe650fee6513f8 Mon Sep 17 00:00:00 2001 From: Gerrit Grunwald Date: Thu, 6 May 2021 17:37:47 +0200 Subject: [PATCH] added libc_type --- dist/cleanup/index.js | 2 +- dist/setup/index.js | 7 ++++++- src/installer.ts | 5 +++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/dist/cleanup/index.js b/dist/cleanup/index.js index b28cac8b..c1788366 100644 --- a/dist/cleanup/index.js +++ b/dist/cleanup/index.js @@ -1031,7 +1031,7 @@ exports.INPUT_GPG_PASSPHRASE = 'gpg-passphrase'; exports.INPUT_DEFAULT_GPG_PRIVATE_KEY = undefined; exports.INPUT_DEFAULT_GPG_PASSPHRASE = 'GPG_PASSPHRASE'; exports.STATE_GPG_PRIVATE_KEY_FINGERPRINT = 'gpg-private-key-fingerprint'; -exports.DISCO_URL = 'https://stage.api.foojay.io'; +exports.DISCO_URL = 'https://api.foojay.io'; exports.PACKAGES_PATH = '/disco/v1.0/packages'; exports.EPHEMERAL_IDS_PATH = '/disco/v1.0/ephemeral_ids'; exports.DISTROS = [ diff --git a/dist/setup/index.js b/dist/setup/index.js index 8f53d957..b1aebaec 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -25768,7 +25768,7 @@ exports.INPUT_GPG_PASSPHRASE = 'gpg-passphrase'; exports.INPUT_DEFAULT_GPG_PRIVATE_KEY = undefined; exports.INPUT_DEFAULT_GPG_PASSPHRASE = 'GPG_PASSPHRASE'; exports.STATE_GPG_PRIVATE_KEY_FINGERPRINT = 'gpg-private-key-fingerprint'; -exports.DISCO_URL = 'https://stage.api.foojay.io'; +exports.DISCO_URL = 'https://api.foojay.io'; exports.PACKAGES_PATH = '/disco/v1.0/packages'; exports.EPHEMERAL_IDS_PATH = '/disco/v1.0/ephemeral_ids'; exports.DISTROS = [ @@ -33694,19 +33694,23 @@ function getDownloadInfo(refs, version, arch, javaPackage, distro = 'zulu') { distribution = 'zulu'; } let archiveType; + let libcType; if (IS_WINDOWS) { operatingSystem = 'windows'; archiveType = 'zip'; + libcType = 'c_std_lib'; } else { if (process.platform === 'darwin') { operatingSystem = 'macos'; let zipArchive = distribution === 'liberica' || distribution === 'openlogic'; archiveType = zipArchive ? 'zip' : 'tar.gz'; + libcType = 'libc'; } else { operatingSystem = 'linux'; archiveType = distribution === 'ojdk_build' ? 'zip' : 'tar.gz'; + libcType = 'glibc'; } } let url = constants_1.DISCO_URL + constants_1.PACKAGES_PATH; @@ -33728,6 +33732,7 @@ function getDownloadInfo(refs, version, arch, javaPackage, distro = 'zulu') { url += '&architecture=' + architecture; url += '&operating_system=' + operatingSystem; url += '&archive_type=' + archiveType; + url += '&libc_type=' + libcType; if (version.includes('x') || version.includes('ea') || version.startsWith('1.')) { diff --git a/src/installer.ts b/src/installer.ts index 22ed92a8..4e11959a 100644 --- a/src/installer.ts +++ b/src/installer.ts @@ -220,18 +220,22 @@ async function getDownloadInfo( distribution = 'zulu'; } let archiveType; + let libcType; if (IS_WINDOWS) { operatingSystem = 'windows'; archiveType = 'zip'; + libcType = 'c_std_lib'; } else { if (process.platform === 'darwin') { operatingSystem = 'macos'; let zipArchive = distribution === 'liberica' || distribution === 'openlogic'; archiveType = zipArchive ? 'zip' : 'tar.gz'; + libcType = 'libc'; } else { operatingSystem = 'linux'; archiveType = distribution === 'ojdk_build' ? 'zip' : 'tar.gz'; + libcType = 'glibc'; } } @@ -253,6 +257,7 @@ async function getDownloadInfo( url += '&architecture=' + architecture; url += '&operating_system=' + operatingSystem; url += '&archive_type=' + archiveType; + url += '&libc_type=' + libcType; if ( version.includes('x') || version.includes('ea') ||