mirror of https://github.com/docker/cli.git
Merge pull request #1709 from thaJeztah/18.09_backport_bump_golang_1.11
[18.09 backport] bump Golang 1.11.11, and some makefile improvements
This commit is contained in:
commit
5f4a501c27
4
Makefile
4
Makefile
|
@ -21,6 +21,10 @@ test: test-unit ## run tests
|
|||
test-coverage: ## run test coverage
|
||||
./scripts/test/unit-with-coverage $(shell go list ./... | grep -vE '/vendor/|/e2e/')
|
||||
|
||||
.PHONY: fmt
|
||||
fmt:
|
||||
go list -f {{.Dir}} ./... | xargs gofmt -w -s -d
|
||||
|
||||
.PHONY: lint
|
||||
lint: ## run all the lint tools
|
||||
gometalinter --config gometalinter.json ./...
|
||||
|
|
|
@ -4,7 +4,7 @@ clone_folder: c:\gopath\src\github.com\docker\cli
|
|||
|
||||
environment:
|
||||
GOPATH: c:\gopath
|
||||
GOVERSION: 1.10.8
|
||||
GOVERSION: 1.11.11
|
||||
DEPVERSION: v0.4.1
|
||||
|
||||
install:
|
||||
|
|
|
@ -231,7 +231,7 @@ func (c *client) iterateEndpoints(ctx context.Context, namedRef reference.Named,
|
|||
repoEndpoint := repositoryEndpoint{endpoint: endpoint, info: repoInfo}
|
||||
repo, err := c.getRepositoryForReference(ctx, namedRef, repoEndpoint)
|
||||
if err != nil {
|
||||
logrus.Debugf("error with repo endpoint %s: %s", repoEndpoint, err)
|
||||
logrus.Debugf("error %s with repo endpoint %+v", err, repoEndpoint)
|
||||
if _, ok := err.(ErrHTTPProto); ok {
|
||||
continue
|
||||
}
|
||||
|
|
|
@ -10,7 +10,12 @@ LINTER_IMAGE_NAME = docker-cli-lint$(IMAGE_TAG)
|
|||
CROSS_IMAGE_NAME = docker-cli-cross$(IMAGE_TAG)
|
||||
VALIDATE_IMAGE_NAME = docker-cli-shell-validate$(IMAGE_TAG)
|
||||
E2E_IMAGE_NAME = docker-cli-e2e$(IMAGE_TAG)
|
||||
GO_BUILD_CACHE ?= y
|
||||
MOUNTS = -v "$(CURDIR)":/go/src/github.com/docker/cli
|
||||
CACHE_VOLUME_NAME := docker-cli-dev-cache
|
||||
ifeq ($(GO_BUILD_CACHE),y)
|
||||
MOUNTS += -v "$(CACHE_VOLUME_NAME):/root/.cache/go-build"
|
||||
endif
|
||||
VERSION = $(shell cat VERSION)
|
||||
ENVVARS = -e VERSION=$(VERSION) -e GITCOMMIT -e PLATFORM
|
||||
|
||||
|
@ -54,6 +59,7 @@ build: binary ## alias for binary
|
|||
.PHONY: clean
|
||||
clean: build_docker_image ## clean build artifacts
|
||||
docker run --rm $(ENVVARS) $(MOUNTS) $(DEV_DOCKER_IMAGE_NAME) make clean
|
||||
docker volume rm -f $(CACHE_VOLUME_NAME)
|
||||
|
||||
.PHONY: test-unit
|
||||
test-unit: build_docker_image # run unit tests (using go test)
|
||||
|
@ -86,6 +92,10 @@ shell: dev ## alias for dev
|
|||
lint: build_linter_image ## run linters
|
||||
docker run -ti $(ENVVARS) $(MOUNTS) $(LINTER_IMAGE_NAME)
|
||||
|
||||
.PHONY: fmt
|
||||
fmt:
|
||||
docker run --rm $(ENVVARS) $(MOUNTS) $(DEV_DOCKER_IMAGE_NAME) make fmt
|
||||
|
||||
.PHONY: vendor
|
||||
vendor: build_docker_image vendor.conf ## download dependencies (vendor/) listed in vendor.conf
|
||||
docker run -ti --rm $(ENVVARS) $(MOUNTS) $(DEV_DOCKER_IMAGE_NAME) make vendor
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM golang:1.10.8-alpine
|
||||
FROM golang:1.11.11-alpine
|
||||
|
||||
RUN apk add -U git bash coreutils gcc musl-dev
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM dockercore/golang-cross:1.10.8@sha256:a93210f55a8137b4aa4b9f033ac7a80b66ab6337e98e7afb62abe93b4ad73cad
|
||||
FROM dockercore/golang-cross:1.11.11
|
||||
ENV DISABLE_WARN_OUTSIDE_CONTAINER=1
|
||||
WORKDIR /go/src/github.com/docker/cli
|
||||
COPY . .
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
|
||||
FROM golang:1.10.8-alpine
|
||||
FROM golang:1.11.11-alpine
|
||||
|
||||
RUN apk add -U git make bash coreutils ca-certificates curl
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
ARG GO_VERSION=1.10.8
|
||||
ARG GO_VERSION=1.11.11
|
||||
|
||||
FROM docker/containerd-shim-process:a4d1531 AS containerd-shim-process
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM golang:1.10.8-alpine
|
||||
FROM golang:1.11.11-alpine
|
||||
|
||||
RUN apk add -U git
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ export CGO_ENABLED=1
|
|||
export GOOS=darwin
|
||||
export GOARCH=amd64
|
||||
export CC=o64-clang
|
||||
export CXX=o64-clang++
|
||||
export LDFLAGS="$LDFLAGS -linkmode external -s"
|
||||
export LDFLAGS_STATIC_DOCKER='-extld='${CC}
|
||||
|
||||
|
|
Loading…
Reference in New Issue