Skip to content

Commit

Permalink
remove golangci-lint hash check (#333)
Browse files Browse the repository at this point in the history
  • Loading branch information
yys authored Mar 24, 2020
1 parent eefea82 commit 137e367
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
4 changes: 1 addition & 3 deletions contrib/devtools/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ endif

GOPATH ?= $(shell $(GO) env GOPATH)
GITHUBDIR := $(GOPATH)$(FS)src$(FS)github.com
GOLANGCI_LINT_VERSION := v1.22.2
GOLANGCI_LINT_HASHSUM := f11179f445385a4a6d5079d67de63fe48a9113cee8e9ee0ced19327a83a4394b

###
# Functions
Expand Down Expand Up @@ -55,7 +53,7 @@ tools-stamp: $(RUNSIM)
golangci-lint: $(GOLANGCI_LINT)
$(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)

# 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
Expand Down
6 changes: 1 addition & 5 deletions contrib/devtools/install-golangci-lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ installer="$(mktemp)"
trap "rm -f ${installer}" EXIT

GOBIN="${1}"
VERSION="${2}"
HASHSUM="${3}"
CURL="$(which curl)"

f_sha256() {
Expand All @@ -26,9 +24,7 @@ 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}"

echo "Checking hashsum ..." >&2
[ "${HASHSUM}" = "$(f_sha256 ${installer})" ]
chmod +x "${installer}"

echo "Launching installer ..." >&2
exec "${installer}" -d -b "${GOBIN}" "${VERSION}"
exec "${installer}" -d -b "${GOBIN}" "${VERSION}"

0 comments on commit 137e367

Please sign in to comment.