Skip to content

Commit 6ff7981

Browse files
authored
YETUS-1206. upgrade golangci-lint to match bundled go 1.19 version (#294)
1 parent ccf15ba commit 6ff7981

File tree

1 file changed

+9
-3
lines changed
  • precommit/src/main/shell/test-patch-docker

1 file changed

+9
-3
lines changed

precommit/src/main/shell/test-patch-docker/Dockerfile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,11 +204,17 @@ RUN git clone \
204204

205205
####
206206
# golangci-lint (Multi-tool golang linter)
207+
#
208+
# NOTE: go must be installed prior to executing this block!
207209
####
208210
FROM yetusbase as yetusgolangci
209-
ARG GOLANGCILINT_VERSION=1.45.2
211+
ARG GOLANGCILINT_VERSION=1.50.0
210212
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
211-
RUN go install github.com/golangci/golangci-lint/cmd/golangci-lint@v$GOLANGCILINT_VERSION
213+
RUN curl -sSL \
214+
https://github.com/golangci/golangci-lint/releases/download/v$GOLANGCILINT_VERSION/golangci-lint-$GOLANGCILINT_VERSION-"$(go env GOOS)"-"$(go env GOARCH)".tar.gz \
215+
-o golangcilint.tar.gz \
216+
&& tar -xzf golangcilint.tar.gz -C /usr/local/bin --strip-components 1 \
217+
&& rm golangcilint.tar.gz
212218

213219
########
214220
#
@@ -411,7 +417,7 @@ RUN ln -s /opt/bats/bin/bats /usr/local/bin/bats
411417

412418
COPY --from=yetusrevive /root/go/bin/* /usr/local/bin
413419
COPY --from=yetuscheckmake /tmp/checkmake/checkmake /usr/local/bin
414-
COPY --from=yetusgolangci /root/go/bin/* /usr/local/bin
420+
COPY --from=yetusgolangci /usr/local/bin/golangci-lint /usr/local/bin
415421

416422
####
417423
# YETUS CUT HERE

0 commit comments

Comments
 (0)