mirror of
https://github.com/golangci/golangci-lint-action.git
synced 2026-01-19 22:34:29 +07:00
build(deps): bump the dependencies group across 1 directory with 4 updates (#1277)
Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import * as core from "@actions/core"
|
||||
import * as tc from "@actions/tool-cache"
|
||||
import { exec, ExecOptions } from "child_process"
|
||||
import { exec, ExecOptionsWithStringEncoding } from "child_process"
|
||||
import os from "os"
|
||||
import path from "path"
|
||||
import { promisify } from "util"
|
||||
@@ -82,7 +82,7 @@ async function goInstall(versionInfo: VersionInfo): Promise<string> {
|
||||
|
||||
const startedAt = Date.now()
|
||||
|
||||
const options: ExecOptions = { env: { ...process.env, CGO_ENABLED: "1" } }
|
||||
const options: ExecOptionsWithStringEncoding = { env: { ...process.env, CGO_ENABLED: "1" } }
|
||||
|
||||
const exres = await execShellCommand(
|
||||
`go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@${versionInfo.TargetVersion}`,
|
||||
@@ -160,21 +160,20 @@ function getAssetURL(versionInfo: VersionInfo): string {
|
||||
break
|
||||
}
|
||||
|
||||
let arch = os.arch()
|
||||
switch (arch) {
|
||||
let platformArch = "amd64"
|
||||
switch (os.arch()) {
|
||||
case "arm64":
|
||||
arch = "arm64"
|
||||
platformArch = "arm64"
|
||||
break
|
||||
case "x64":
|
||||
arch = "amd64"
|
||||
platformArch = "amd64"
|
||||
break
|
||||
case "x32":
|
||||
case "ia32":
|
||||
arch = "386"
|
||||
platformArch = "386"
|
||||
break
|
||||
}
|
||||
|
||||
const noPrefix = versionInfo.TargetVersion.slice(1)
|
||||
|
||||
return `https://github.com/golangci/golangci-lint/releases/download/${versionInfo.TargetVersion}/golangci-lint-${noPrefix}-${platform}-${arch}.${ext}`
|
||||
return `https://github.com/golangci/golangci-lint/releases/download/${versionInfo.TargetVersion}/golangci-lint-${noPrefix}-${platform}-${platformArch}.${ext}`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user