File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -66,11 +66,18 @@ function is_installed {
66
66
return 1
67
67
}
68
68
69
+ function golangci_lint_has_version {
70
+ # Trim "v" from version prefix since golangci-lint --version
71
+ # sometimes does not include it, depending on how it's built
72
+ golangci-lint --version | grep --quiet --fixed-strings " ${1# " v" } "
73
+ }
74
+
69
75
function fetch_go_tools {
70
76
header_text " Checking for golangci-lint"
71
- if ! is_installed golangci-lint; then
77
+ local golangci_lint_version=" v1.18.0"
78
+ if ! is_installed golangci-lint || ! golangci_lint_has_version " ${golangci_lint_version} " ; then
72
79
header_text " Installing golangci-lint"
73
- go get github.com/golangci/golangci-lint
/cmd/[email protected]
80
+ curl --location --silent --retry 5 --fail https://install.goreleaser.com/ github.com/golangci/golangci-lint.sh | sh -s -- -b $( go env GOPATH ) /bin " ${golangci_lint_version} "
74
81
fi
75
82
}
76
83
You can’t perform that action at this time.
0 commit comments