chore: use new assets file (#1154)
This commit is contained in:
committed by
GitHub
parent
5421a116d2
commit
1dd93d052e
9
dist/post_run/index.js
generated
vendored
9
dist/post_run/index.js
generated
vendored
@@ -93757,8 +93757,10 @@ async function goInstall(versionConfig) {
|
||||
core.info(`Installing golangci-lint ${versionConfig.TargetVersion}...`);
|
||||
const startedAt = Date.now();
|
||||
const options = { env: { ...process.env, CGO_ENABLED: "1" } };
|
||||
// TODO(ldez): it should be updated for v2.
|
||||
const exres = await execShellCommand(`go install github.com/golangci/golangci-lint/cmd/golangci-lint@${versionConfig.TargetVersion}`, options);
|
||||
printOutput(exres);
|
||||
// TODO(ldez): it should be updated for v2.
|
||||
const res = await execShellCommand(`go install -n github.com/golangci/golangci-lint/cmd/golangci-lint@${versionConfig.TargetVersion}`, options);
|
||||
printOutput(res);
|
||||
// The output of `go install -n` when the binary is already installed is `touch <path_to_the_binary>`.
|
||||
@@ -94329,6 +94331,7 @@ const versionRe = /^v(\d+)\.(\d+)(?:\.(\d+))?$/;
|
||||
const modVersionRe = /github.com\/golangci\/golangci-lint\s(v.+)/;
|
||||
const parseVersion = (s) => {
|
||||
if (s == "latest" || s == "") {
|
||||
// TODO(ldez): it should be replaced with an explicit version (ex: v1.64.0)
|
||||
return null;
|
||||
}
|
||||
const match = s.match(versionRe);
|
||||
@@ -94348,6 +94351,7 @@ const stringifyVersion = (v) => {
|
||||
return `v${v.major}.${v.minor}${v.patch !== null ? `.${v.patch}` : ``}`;
|
||||
};
|
||||
exports.stringifyVersion = stringifyVersion;
|
||||
// TODO(ldez): it should be updated to v2.0.0.
|
||||
const minVersion = {
|
||||
major: 1,
|
||||
minor: 28,
|
||||
@@ -94397,7 +94401,8 @@ const getConfig = async () => {
|
||||
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 = 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})`);
|
||||
@@ -94413,6 +94418,8 @@ async function findLintVersion(mode) {
|
||||
core.info(`Finding needed golangci-lint version...`);
|
||||
if (mode == install_1.InstallMode.GoInstall) {
|
||||
const v = core.getInput(`version`);
|
||||
// TODO(ldez): latest should be replaced with an explicit version (ex: v1.64.0).
|
||||
// TODO(ldez): AssetURL should be updated for v2.
|
||||
return { TargetVersion: v ? v : "latest", AssetURL: "github.com/golangci/golangci-lint" };
|
||||
}
|
||||
const reqLintVersion = getRequestedLintVersion();
|
||||
|
9
dist/run/index.js
generated
vendored
9
dist/run/index.js
generated
vendored
@@ -93757,8 +93757,10 @@ async function goInstall(versionConfig) {
|
||||
core.info(`Installing golangci-lint ${versionConfig.TargetVersion}...`);
|
||||
const startedAt = Date.now();
|
||||
const options = { env: { ...process.env, CGO_ENABLED: "1" } };
|
||||
// TODO(ldez): it should be updated for v2.
|
||||
const exres = await execShellCommand(`go install github.com/golangci/golangci-lint/cmd/golangci-lint@${versionConfig.TargetVersion}`, options);
|
||||
printOutput(exres);
|
||||
// TODO(ldez): it should be updated for v2.
|
||||
const res = await execShellCommand(`go install -n github.com/golangci/golangci-lint/cmd/golangci-lint@${versionConfig.TargetVersion}`, options);
|
||||
printOutput(res);
|
||||
// The output of `go install -n` when the binary is already installed is `touch <path_to_the_binary>`.
|
||||
@@ -94329,6 +94331,7 @@ const versionRe = /^v(\d+)\.(\d+)(?:\.(\d+))?$/;
|
||||
const modVersionRe = /github.com\/golangci\/golangci-lint\s(v.+)/;
|
||||
const parseVersion = (s) => {
|
||||
if (s == "latest" || s == "") {
|
||||
// TODO(ldez): it should be replaced with an explicit version (ex: v1.64.0)
|
||||
return null;
|
||||
}
|
||||
const match = s.match(versionRe);
|
||||
@@ -94348,6 +94351,7 @@ const stringifyVersion = (v) => {
|
||||
return `v${v.major}.${v.minor}${v.patch !== null ? `.${v.patch}` : ``}`;
|
||||
};
|
||||
exports.stringifyVersion = stringifyVersion;
|
||||
// TODO(ldez): it should be updated to v2.0.0.
|
||||
const minVersion = {
|
||||
major: 1,
|
||||
minor: 28,
|
||||
@@ -94397,7 +94401,8 @@ const getConfig = async () => {
|
||||
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 = 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})`);
|
||||
@@ -94413,6 +94418,8 @@ async function findLintVersion(mode) {
|
||||
core.info(`Finding needed golangci-lint version...`);
|
||||
if (mode == install_1.InstallMode.GoInstall) {
|
||||
const v = core.getInput(`version`);
|
||||
// TODO(ldez): latest should be replaced with an explicit version (ex: v1.64.0).
|
||||
// TODO(ldez): AssetURL should be updated for v2.
|
||||
return { TargetVersion: v ? v : "latest", AssetURL: "github.com/golangci/golangci-lint" };
|
||||
}
|
||||
const reqLintVersion = getRequestedLintVersion();
|
||||
|
Reference in New Issue
Block a user