mirror of
https://github.com/actions/setup-go.git
synced 2025-05-04 14:14:34 +00:00
Merge branch 'main' into use-actual-version-in-cache
This commit is contained in:
10
dist/setup/index.js
vendored
10
dist/setup/index.js
vendored
@ -63398,12 +63398,12 @@ function getInfoFromDist(versionSpec, arch) {
|
||||
}
|
||||
function findMatch(versionSpec, arch = os_1.default.arch()) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
let archFilter = sys.getArch(arch);
|
||||
let platFilter = sys.getPlatform();
|
||||
const archFilter = sys.getArch(arch);
|
||||
const platFilter = sys.getPlatform();
|
||||
let result;
|
||||
let match;
|
||||
const dlUrl = 'https://golang.org/dl/?mode=json&include=all';
|
||||
let candidates = yield module.exports.getVersionsDist(dlUrl);
|
||||
const candidates = yield module.exports.getVersionsDist(dlUrl);
|
||||
if (!candidates) {
|
||||
throw new Error(`golang download url did not return results`);
|
||||
}
|
||||
@ -63436,7 +63436,7 @@ exports.findMatch = findMatch;
|
||||
function getVersionsDist(dlUrl) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
// this returns versions descending so latest is first
|
||||
let http = new httpm.HttpClient('setup-go', [], {
|
||||
const http = new httpm.HttpClient('setup-go', [], {
|
||||
allowRedirects: true,
|
||||
maxRedirects: 3
|
||||
});
|
||||
@ -63484,7 +63484,7 @@ function resolveStableVersionDist(versionSpec, arch) {
|
||||
let archFilter = sys.getArch(arch);
|
||||
let platFilter = sys.getPlatform();
|
||||
const dlUrl = 'https://golang.org/dl/?mode=json&include=all';
|
||||
let candidates = yield module.exports.getVersionsDist(dlUrl);
|
||||
const candidates = yield module.exports.getVersionsDist(dlUrl);
|
||||
if (!candidates) {
|
||||
throw new Error(`golang download url did not return results`);
|
||||
}
|
||||
|
Reference in New Issue
Block a user