mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-19 09:16:29 +00:00
use latest go-compile (#3906)
Signed-off-by: Avi Deitcher <avi@deitcher.net>
This commit is contained in:
parent
500fdb163b
commit
c51ce2551e
4
Makefile
4
Makefile
@ -4,7 +4,7 @@ VERSION="v0.8+"
|
||||
TEST_SUITE ?=
|
||||
TEST_SHARD ?=
|
||||
|
||||
GO_COMPILE=linuxkit/go-compile:7b1f5a37d2a93cd4a9aa2a87db264d8145944006
|
||||
GO_COMPILE=linuxkit/go-compile:c97703655e8510b7257ffc57f25e40337b0f0813
|
||||
|
||||
ifeq ($(OS),Windows_NT)
|
||||
LINUXKIT?=$(CURDIR)/bin/linuxkit.exe
|
||||
@ -34,7 +34,7 @@ export VERSION GO_COMPILE GOOS GOARCH LOCAL_TARGET LINUXKIT
|
||||
default: linuxkit $(RTF)
|
||||
all: default
|
||||
|
||||
RTF_COMMIT=1b6277593346dea7e6039d528c4e8321a4bd9eaf
|
||||
RTF_COMMIT=b74a4f7c78e5cddcf7e6d2e6be7be312b9f645fc
|
||||
RTF_CMD=github.com/linuxkit/rtf/cmd
|
||||
RTF_VERSION=0.0
|
||||
$(RTF): tmp_rtf_bin.tar | bin
|
||||
|
@ -1,6 +1,6 @@
|
||||
VERSION?="v0.0-dev"
|
||||
GIT_COMMIT=$(shell git rev-list -1 HEAD)
|
||||
GO_COMPILE?=linuxkit/go-compile:7b1f5a37d2a93cd4a9aa2a87db264d8145944006
|
||||
GO_COMPILE?=linuxkit/go-compile:c97703655e8510b7257ffc57f25e40337b0f0813
|
||||
export GO_FLAGS=-mod=vendor
|
||||
|
||||
ifeq ($(OS),Windows_NT)
|
||||
@ -78,7 +78,7 @@ LOCAL_TARGET ?= $(LINUXKIT)
|
||||
local-check: $(LINUXKIT_DEPS)
|
||||
@echo gofmt... && o=$$(gofmt -s -l $(filter %.go,$(LINUXKIT_DEPS))) && if [ -n "$$o" ] ; then echo $$o ; exit 1 ; fi
|
||||
@echo govet... && go vet -printf=false ./...
|
||||
@echo golint... && set -e ; for i in $(filter %.go,$(LINUXKIT_DEPS)); do golint $$i ; done
|
||||
@echo golangci-lint... && golangci-lint run ./...
|
||||
@echo ineffassign... && ineffassign ./...
|
||||
|
||||
local-build:
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user