mirror of
https://github.com/actions/setup-java.git
synced 2024-12-01 21:00:56 -05:00
Add Hidden JDK 11 Versions
This commit is contained in:
parent
4e56c31b28
commit
393543671a
2 changed files with 14 additions and 4 deletions
8
dist/setup/index.js
vendored
8
dist/setup/index.js
vendored
|
@ -124592,11 +124592,12 @@ class JetBrainsDistribution extends base_installer_1.JavaBase {
|
|||
// GitHub API doesn't provide way to retrieve the count of pages to iterate so infinity loop
|
||||
let page_index = 1;
|
||||
const rawVersions = [];
|
||||
const bearerToken = process.env.GITHUB_TOKEN;
|
||||
while (true) {
|
||||
const requestArguments = `per_page=100&page=${page_index}`;
|
||||
const requestHeaders = {};
|
||||
if (process.env.GITHUB_TOKEN) {
|
||||
requestHeaders['Authorization'] = `Bearer ${process.env.GITHUB_TOKEN}`;
|
||||
if (bearerToken) {
|
||||
requestHeaders['Authorization'] = `Bearer ${bearerToken}`;
|
||||
}
|
||||
const rawUrl = `https://api.github.com/repos/JetBrains/JetBrainsRuntime/releases?${requestArguments}`;
|
||||
if (core.isDebug() && page_index === 1) {
|
||||
|
@ -124611,6 +124612,9 @@ class JetBrainsDistribution extends base_installer_1.JavaBase {
|
|||
rawVersions.push(...paginationPage);
|
||||
page_index++;
|
||||
}
|
||||
// Add versions not available from the API but are downloadable
|
||||
const hidden = ['11_0_10b1145.115', '11_0_11b1341.60'];
|
||||
rawVersions.push(...hidden.map(tag => ({ tag_name: tag, name: tag })));
|
||||
const versions0 = rawVersions.map((v) => __awaiter(this, void 0, void 0, function* () {
|
||||
var _a;
|
||||
// Release tags look like one of these:
|
||||
|
|
|
@ -96,12 +96,14 @@ export class JetBrainsDistribution extends JavaBase {
|
|||
// GitHub API doesn't provide way to retrieve the count of pages to iterate so infinity loop
|
||||
let page_index = 1;
|
||||
const rawVersions: IJetBrainsRawVersion[] = [];
|
||||
const bearerToken = process.env.GITHUB_TOKEN;
|
||||
|
||||
while (true) {
|
||||
const requestArguments = `per_page=100&page=${page_index}`;
|
||||
const requestHeaders: OutgoingHttpHeaders = {};
|
||||
|
||||
if (process.env.GITHUB_TOKEN) {
|
||||
requestHeaders['Authorization'] = `Bearer ${process.env.GITHUB_TOKEN}`;
|
||||
if (bearerToken) {
|
||||
requestHeaders['Authorization'] = `Bearer ${bearerToken}`;
|
||||
}
|
||||
|
||||
const rawUrl = `https://api.github.com/repos/JetBrains/JetBrainsRuntime/releases?${requestArguments}`;
|
||||
|
@ -123,6 +125,10 @@ export class JetBrainsDistribution extends JavaBase {
|
|||
page_index++;
|
||||
}
|
||||
|
||||
// Add versions not available from the API but are downloadable
|
||||
const hidden = ['11_0_10b1145.115', '11_0_11b1341.60'];
|
||||
rawVersions.push(...hidden.map(tag => ({tag_name: tag, name: tag})));
|
||||
|
||||
const versions0 = rawVersions.map(async v => {
|
||||
// Release tags look like one of these:
|
||||
// jbr-release-21.0.3b465.3
|
||||
|
|
Loading…
Reference in a new issue