mirror of
https://code.forgejo.org/actions/setup-go.git
synced 2024-12-26 23:12:21 -05:00
Fix golang download url to go.dev
This commit is contained in:
parent
d60b41a563
commit
e6086be66c
1 changed files with 4 additions and 4 deletions
|
@ -10,6 +10,8 @@ import {StableReleaseAlias} from './utils';
|
||||||
|
|
||||||
type InstallationType = 'dist' | 'manifest';
|
type InstallationType = 'dist' | 'manifest';
|
||||||
|
|
||||||
|
const golangDownloadUrl = 'https://go.dev/dl/?mode=json&include=all';
|
||||||
|
|
||||||
export interface IGoVersionFile {
|
export interface IGoVersionFile {
|
||||||
filename: string;
|
filename: string;
|
||||||
// darwin, linux, windows
|
// darwin, linux, windows
|
||||||
|
@ -335,9 +337,8 @@ export async function findMatch(
|
||||||
let result: IGoVersion | undefined;
|
let result: IGoVersion | undefined;
|
||||||
let match: IGoVersion | undefined;
|
let match: IGoVersion | undefined;
|
||||||
|
|
||||||
const dlUrl = 'https://golang.org/dl/?mode=json&include=all';
|
|
||||||
const candidates: IGoVersion[] | null = await module.exports.getVersionsDist(
|
const candidates: IGoVersion[] | null = await module.exports.getVersionsDist(
|
||||||
dlUrl
|
golangDownloadUrl
|
||||||
);
|
);
|
||||||
if (!candidates) {
|
if (!candidates) {
|
||||||
throw new Error(`golang download url did not return results`);
|
throw new Error(`golang download url did not return results`);
|
||||||
|
@ -434,9 +435,8 @@ export function parseGoVersionFile(versionFilePath: string): string {
|
||||||
async function resolveStableVersionDist(versionSpec: string, arch: string) {
|
async function resolveStableVersionDist(versionSpec: string, arch: string) {
|
||||||
const archFilter = sys.getArch(arch);
|
const archFilter = sys.getArch(arch);
|
||||||
const platFilter = sys.getPlatform();
|
const platFilter = sys.getPlatform();
|
||||||
const dlUrl = 'https://golang.org/dl/?mode=json&include=all';
|
|
||||||
const candidates: IGoVersion[] | null = await module.exports.getVersionsDist(
|
const candidates: IGoVersion[] | null = await module.exports.getVersionsDist(
|
||||||
dlUrl
|
golangDownloadUrl
|
||||||
);
|
);
|
||||||
if (!candidates) {
|
if (!candidates) {
|
||||||
throw new Error(`golang download url did not return results`);
|
throw new Error(`golang download url did not return results`);
|
||||||
|
|
Loading…
Reference in a new issue