|
|
|
@ -336,12 +336,17 @@ func downloadLinter(cachedir string) string { |
|
|
|
|
|
|
|
|
|
csdb := build.MustLoadChecksums("build/checksums.txt") |
|
|
|
|
arch := runtime.GOARCH |
|
|
|
|
if arch == "arm" { |
|
|
|
|
ext := ".tar.gz" |
|
|
|
|
|
|
|
|
|
if runtime.GOOS == "windows" { |
|
|
|
|
ext = ".zip" |
|
|
|
|
} |
|
|
|
|
if arch == "arm" { |
|
|
|
|
arch += "v" + os.Getenv("GOARM") |
|
|
|
|
} |
|
|
|
|
base := fmt.Sprintf("golangci-lint-%s-%s-%s", version, runtime.GOOS, arch) |
|
|
|
|
url := fmt.Sprintf("https://github.com/golangci/golangci-lint/releases/download/v%s/%s.tar.gz", version, base) |
|
|
|
|
archivePath := filepath.Join(cachedir, base+".tar.gz") |
|
|
|
|
url := fmt.Sprintf("https://github.com/golangci/golangci-lint/releases/download/v%s/%s%s", version, base, ext) |
|
|
|
|
archivePath := filepath.Join(cachedir, base+ext) |
|
|
|
|
if err := csdb.DownloadFile(url, archivePath); err != nil { |
|
|
|
|
log.Fatal(err) |
|
|
|
|
} |
|
|
|
|