From 31530f7ca3652773596e843a59b806f66188012c Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Tue, 4 Feb 2025 02:42:40 +0100 Subject: [PATCH] chore: use new assets file --- src/version.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/version.ts b/src/version.ts index d1421e5..32ba183 100644 --- a/src/version.ts +++ b/src/version.ts @@ -18,6 +18,7 @@ const modVersionRe = /github.com\/golangci\/golangci-lint\s(v.+)/ const parseVersion = (s: string): Version => { if (s == "latest" || s == "") { + // TODO(ldez): it should be replaced with an explicit version (ex: v1.64.0) return null } @@ -40,6 +41,7 @@ export const stringifyVersion = (v: Version): string => { return `v${v.major}.${v.minor}${v.patch !== null ? `.${v.patch}` : ``}` } +// TODO(ldez): it should be updated to v2.0.0. const minVersion = { major: 1, minor: 28, @@ -114,7 +116,8 @@ const getConfig = async (): Promise => { maxRetries: 5, }) try { - const url = `https://raw.githubusercontent.com/golangci/golangci-lint/master/assets/github-action-config.json` + // TODO(ldez): HEAD should be replaced with an explicit version (ex: v1.64.0). + const url = `https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/assets/github-action-config-v1.json` const response: httpm.HttpClientResponse = await http.get(url) if (response.message.statusCode !== 200) { throw new Error(`failed to download from "${url}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`) @@ -132,6 +135,7 @@ export async function findLintVersion(mode: InstallMode): Promise if (mode == InstallMode.GoInstall) { const v: string = core.getInput(`version`) + // TODO(ldez): latest should be replaced with an explicit version (ex: v1.64.0) return { TargetVersion: v ? v : "latest", AssetURL: "github.com/golangci/golangci-lint" } }