mirror of https://github.com/certusone/wasmd.git
Merge PR #141: Upgrade golangci-lint to latest release (1.19.1)
This commit is contained in:
parent
3e3fae888d
commit
5e817641bb
|
@ -17,7 +17,6 @@ endif
|
|||
|
||||
GOPATH ?= $(shell $(GO) env GOPATH)
|
||||
GITHUBDIR := $(GOPATH)$(FS)src$(FS)github.com
|
||||
GOLANGCI_LINT_VERSION := v1.18.0
|
||||
GOLANGCI_LINT_HASHSUM := 8d21cc95da8d3daf8321ac40091456fc26123c964d7c2281d339d431f2f4c840
|
||||
|
||||
###
|
||||
|
@ -54,7 +53,7 @@ tools-stamp: $(RUNSIM)
|
|||
|
||||
$(GOLANGCI_LINT): $(mkfile_dir)/install-golangci-lint.sh
|
||||
@echo "Installing golangci-lint..."
|
||||
@bash $(mkfile_dir)/install-golangci-lint.sh $(TOOLS_DESTDIR) $(GOLANGCI_LINT_VERSION) $(GOLANGCI_LINT_HASHSUM)
|
||||
@bash $(mkfile_dir)/install-golangci-lint.sh $(TOOLS_DESTDIR) $(GOLANGCI_LINT_HASHSUM)
|
||||
|
||||
# Install the runsim binary with a temporary workaround of entering an outside
|
||||
# directory as the "go get" command ignores the -mod option and will polute the
|
||||
|
|
|
@ -2,19 +2,24 @@
|
|||
|
||||
set -euo pipefail
|
||||
|
||||
installer="$(mktemp)"
|
||||
trap "rm -f ${installer}" EXIT
|
||||
|
||||
GOBIN="${1}"
|
||||
CURL="$(which curl)"
|
||||
HASHSUM="${2}"
|
||||
|
||||
f_sha256() {
|
||||
local l_file
|
||||
l_file=$1
|
||||
python -sBc "import hashlib;print(hashlib.sha256(open('$l_file','rb').read()).hexdigest())"
|
||||
}
|
||||
|
||||
installer="$(mktemp)"
|
||||
trap "rm -f ${installer}" EXIT
|
||||
|
||||
GOBIN="${1}"
|
||||
VERSION="${2}"
|
||||
HASHSUM="${3}"
|
||||
CURL="$(which curl)"
|
||||
get_latest_release() {
|
||||
"${CURL}" --silent "https://api.github.com/repos/$1/releases/latest" | \
|
||||
grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/'
|
||||
}
|
||||
VERSION="$(get_latest_release golangci/golangci-lint)"
|
||||
|
||||
echo "Downloading golangci-lint ${VERSION} installer ..." >&2
|
||||
"${CURL}" -sfL "https://raw.githubusercontent.com/golangci/golangci-lint/${VERSION}/install.sh" > "${installer}"
|
||||
|
|
Loading…
Reference in New Issue