mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-09-01 15:08:33 +00:00
use latest go-compile (#3906)
Signed-off-by: Avi Deitcher <avi@deitcher.net>
This commit is contained in:
@@ -4,13 +4,22 @@ RUN mkdir -p /out/etc/apk && cp -r /etc/apk/* /out/etc/apk/
|
||||
RUN apk add --no-cache --initdb -p /out \
|
||||
alpine-baselayout \
|
||||
busybox \
|
||||
curl \
|
||||
git \
|
||||
go \
|
||||
musl-dev
|
||||
# Hack to work around an issue wirh go on arm64 requiring gcc
|
||||
|
||||
# curl to install golangci-lint
|
||||
RUN apk add --no-cache curl
|
||||
|
||||
# Hack to work around an issue with go on arm64 requiring gcc
|
||||
RUN [ $(uname -m) = aarch64 ] && apk add --no-cache --initdb -p /out gcc || true
|
||||
RUN rm -rf /out/etc/apk /out/lib/apk /out/var/cache
|
||||
|
||||
# installing golangci-lint
|
||||
RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b /out/go/bin v1.50.1
|
||||
|
||||
|
||||
FROM scratch
|
||||
ENV GOPATH=/go PATH=$PATH:/go/bin
|
||||
COPY --from=mirror /out/ /
|
||||
|
@@ -1 +1,2 @@
|
||||
image: go-compile
|
||||
network: true
|
||||
|
@@ -84,7 +84,7 @@ test -z $(gofmt -s -l .| grep -v .pb. | grep -v vendor/ | tee /dev/stderr)
|
||||
test -z $(GOOS=linux go vet $MOD_ARG -printf=false . 2>&1 | grep -v "^#" | grep -v vendor/ | tee /dev/stderr)
|
||||
|
||||
>&2 echo "golint..."
|
||||
test -z $(find . -type f -name "*.go" -not -path "*/vendor/*" -not -name "*.pb.*" -exec golint {} \; | tee /dev/stderr)
|
||||
test -z $(golangci-lint run ./... | tee /dev/stderr)
|
||||
|
||||
>&2 echo "ineffassign..."
|
||||
test -z $(ineffassign ./... | tee /dev/stderr)
|
||||
|
Reference in New Issue
Block a user