forked from TrueCloudLab/distribution
Move to vendor
Signed-off-by: Olivier Gambier <olivier@docker.com>
This commit is contained in:
parent
c8d8e7e357
commit
77e69b9cf3
1268 changed files with 34 additions and 24 deletions
1
.mailmap
1
.mailmap
|
@ -13,3 +13,4 @@ Sharif Nassar <sharif@mrwacky.com> Sharif Nassar <mrwacky42@users.noreply.github
|
||||||
Sven Dowideit <SvenDowideit@home.org.au> Sven Dowideit <SvenDowideit@users.noreply.github.com>
|
Sven Dowideit <SvenDowideit@home.org.au> Sven Dowideit <SvenDowideit@users.noreply.github.com>
|
||||||
Vincent Giersch <vincent.giersch@ovh.net> Vincent Giersch <vincent@giersch.fr>
|
Vincent Giersch <vincent.giersch@ovh.net> Vincent Giersch <vincent@giersch.fr>
|
||||||
davidli <wenquan.li@hp.com> davidli <wenquan.li@hpe.com>
|
davidli <wenquan.li@hp.com> davidli <wenquan.li@hpe.com>
|
||||||
|
Omer Cohen <git@omer.io> Omer Cohen <git@omerc.net>
|
2
AUTHORS
2
AUTHORS
|
@ -110,4 +110,4 @@ weiyuan.yl <weiyuan.yl@alibaba-inc.com>
|
||||||
xg.song <xg.song@venusource.com>
|
xg.song <xg.song@venusource.com>
|
||||||
xiekeyang <xiekeyang@huawei.com>
|
xiekeyang <xiekeyang@huawei.com>
|
||||||
Yann ROBERT <yann.robert@anantaplex.fr>
|
Yann ROBERT <yann.robert@anantaplex.fr>
|
||||||
yuzou <zouyu7@huawei.com>
|
yuzou <zouyu7@huawei.com>
|
|
@ -1,11 +1,10 @@
|
||||||
FROM golang:1.5.3
|
FROM golang:1.6
|
||||||
|
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get install -y apache2-utils && \
|
apt-get install -y apache2-utils && \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
ENV DISTRIBUTION_DIR /go/src/github.com/docker/distribution
|
ENV DISTRIBUTION_DIR /go/src/github.com/docker/distribution
|
||||||
ENV GOPATH $DISTRIBUTION_DIR/Godeps/_workspace:$GOPATH
|
|
||||||
ENV DOCKER_BUILDTAGS include_oss include_gcs
|
ENV DOCKER_BUILDTAGS include_oss include_gcs
|
||||||
|
|
||||||
WORKDIR $DISTRIBUTION_DIR
|
WORKDIR $DISTRIBUTION_DIR
|
||||||
|
|
40
Makefile
40
Makefile
|
@ -15,7 +15,7 @@ GO_LDFLAGS=-ldflags "-X `go list ./version`.Version=$(VERSION)"
|
||||||
|
|
||||||
.PHONY: clean all fmt vet lint build test binaries
|
.PHONY: clean all fmt vet lint build test binaries
|
||||||
.DEFAULT: all
|
.DEFAULT: all
|
||||||
all: fmt vet fmt lint build test binaries
|
all: fmt vet lint build test binaries
|
||||||
|
|
||||||
AUTHORS: .mailmap .git/HEAD
|
AUTHORS: .mailmap .git/HEAD
|
||||||
git log --format='%aN <%aE>' | sort -fu > $@
|
git log --format='%aN <%aE>' | sort -fu > $@
|
||||||
|
@ -24,51 +24,61 @@ AUTHORS: .mailmap .git/HEAD
|
||||||
version/version.go:
|
version/version.go:
|
||||||
./version/version.sh > $@
|
./version/version.sh > $@
|
||||||
|
|
||||||
${PREFIX}/bin/registry: version/version.go $(shell find . -type f -name '*.go')
|
# Required for go 1.5 to build
|
||||||
|
GO15VENDOREXPERIMENT := 1
|
||||||
|
|
||||||
|
# Package list
|
||||||
|
PKGS := $(shell go list -tags "${DOCKER_BUILDTAGS}" ./... | grep -v ^github.com/docker/distribution/vendor/)
|
||||||
|
|
||||||
|
# Resolving binary dependencies for specific targets
|
||||||
|
GOLINT_BIN := $(GOPATH)/bin/golint
|
||||||
|
GOLINT := $(shell [ -x $(GOLINT_BIN) ] && echo $(GOLINT_BIN) || echo '')
|
||||||
|
|
||||||
|
${PREFIX}/bin/registry: $(wildcard **/*.go)
|
||||||
@echo "+ $@"
|
@echo "+ $@"
|
||||||
@go build -tags "${DOCKER_BUILDTAGS}" -o $@ ${GO_LDFLAGS} ${GO_GCFLAGS} ./cmd/registry
|
@go build -tags "${DOCKER_BUILDTAGS}" -o $@ ${GO_LDFLAGS} ${GO_GCFLAGS} ./cmd/registry
|
||||||
|
|
||||||
${PREFIX}/bin/digest: version/version.go $(shell find . -type f -name '*.go')
|
${PREFIX}/bin/digest: $(wildcard **/*.go)
|
||||||
@echo "+ $@"
|
@echo "+ $@"
|
||||||
@go build -tags "${DOCKER_BUILDTAGS}" -o $@ ${GO_LDFLAGS} ${GO_GCFLAGS} ./cmd/digest
|
@go build -tags "${DOCKER_BUILDTAGS}" -o $@ ${GO_LDFLAGS} ${GO_GCFLAGS} ./cmd/digest
|
||||||
|
|
||||||
${PREFIX}/bin/registry-api-descriptor-template: version/version.go $(shell find . -type f -name '*.go')
|
${PREFIX}/bin/registry-api-descriptor-template: $(wildcard **/*.go)
|
||||||
@echo "+ $@"
|
@echo "+ $@"
|
||||||
@go build -o $@ ${GO_LDFLAGS} ${GO_GCFLAGS} ./cmd/registry-api-descriptor-template
|
@go build -o $@ ${GO_LDFLAGS} ${GO_GCFLAGS} ./cmd/registry-api-descriptor-template
|
||||||
|
|
||||||
docs/spec/api.md: docs/spec/api.md.tmpl ${PREFIX}/bin/registry-api-descriptor-template
|
docs/spec/api.md: docs/spec/api.md.tmpl ${PREFIX}/bin/registry-api-descriptor-template
|
||||||
./bin/registry-api-descriptor-template $< > $@
|
./bin/registry-api-descriptor-template $< > $@
|
||||||
|
|
||||||
# Depends on binaries because vet will silently fail if it can't load compiled
|
vet:
|
||||||
# imports
|
|
||||||
vet: binaries
|
|
||||||
@echo "+ $@"
|
@echo "+ $@"
|
||||||
@go vet ./...
|
@go vet -tags "${DOCKER_BUILDTAGS}" $(PKGS)
|
||||||
|
|
||||||
fmt:
|
fmt:
|
||||||
@echo "+ $@"
|
@echo "+ $@"
|
||||||
@test -z "$$(gofmt -s -l . | grep -v Godeps/_workspace/src/ | tee /dev/stderr)" || \
|
@test -z "$$(gofmt -s -l . 2>&1 | grep -v ^vendor/ | tee /dev/stderr)" || \
|
||||||
echo "+ please format Go code with 'gofmt -s'"
|
(echo >&2 "+ please format Go code with 'gofmt -s'" && false)
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
@echo "+ $@"
|
@echo "+ $@"
|
||||||
@test -z "$$(golint ./... | grep -v Godeps/_workspace/src/ | tee /dev/stderr)"
|
$(if $(GOLINT), , \
|
||||||
|
$(error Please install golint: `go get -u github.com/golang/lint/golint`))
|
||||||
|
@test -z "$$($(GOLINT) ./... 2>&1 | grep -v ^vendor/ | tee /dev/stderr)"
|
||||||
|
|
||||||
build:
|
build:
|
||||||
@echo "+ $@"
|
@echo "+ $@"
|
||||||
@go build -tags "${DOCKER_BUILDTAGS}" -v ${GO_LDFLAGS} ./...
|
@go build -tags "${DOCKER_BUILDTAGS}" -v ${GO_LDFLAGS} $(PKGS)
|
||||||
|
|
||||||
test:
|
test:
|
||||||
@echo "+ $@"
|
@echo "+ $@"
|
||||||
@go test -test.short -tags "${DOCKER_BUILDTAGS}" ./...
|
@go test -test.short -tags "${DOCKER_BUILDTAGS}" $(PKGS)
|
||||||
|
|
||||||
test-full:
|
test-full:
|
||||||
@echo "+ $@"
|
@echo "+ $@"
|
||||||
@go test ./...
|
@go test -tags "${DOCKER_BUILDTAGS}" $(PKGS)
|
||||||
|
|
||||||
binaries: ${PREFIX}/bin/registry ${PREFIX}/bin/digest ${PREFIX}/bin/registry-api-descriptor-template
|
binaries: ${PREFIX}/bin/registry ${PREFIX}/bin/digest ${PREFIX}/bin/registry-api-descriptor-template
|
||||||
@echo "+ $@"
|
@echo "+ $@"
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@echo "+ $@"
|
@echo "+ $@"
|
||||||
@rm -rf "${PREFIX}/bin/registry" "${PREFIX}/bin/registry-api-descriptor-template"
|
@rm -rf "${PREFIX}/bin/registry" "${PREFIX}/bin/digest" "${PREFIX}/bin/registry-api-descriptor-template"
|
||||||
|
|
12
circle.yml
12
circle.yml
|
@ -8,7 +8,7 @@ machine:
|
||||||
|
|
||||||
post:
|
post:
|
||||||
# go
|
# go
|
||||||
- gvm install go1.5.3 --prefer-binary --name=stable
|
- gvm install go1.6 --prefer-binary --name=stable
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
# Convenient shortcuts to "common" locations
|
# Convenient shortcuts to "common" locations
|
||||||
|
@ -51,24 +51,24 @@ test:
|
||||||
|
|
||||||
# First thing: build everything. This will catch compile errors, and it's
|
# First thing: build everything. This will catch compile errors, and it's
|
||||||
# also necessary for go vet to work properly (see #807).
|
# also necessary for go vet to work properly (see #807).
|
||||||
- gvm use stable && godep go install ./...:
|
- gvm use stable && godep go install $(go list ./... | grep -v "/vendor/"):
|
||||||
pwd: $BASE_STABLE
|
pwd: $BASE_STABLE
|
||||||
|
|
||||||
# FMT
|
# FMT
|
||||||
- gvm use stable && test -z "$(gofmt -s -l . | grep -v Godeps/_workspace/src/ | tee /dev/stderr)":
|
- gvm use stable && make fmt:
|
||||||
pwd: $BASE_STABLE
|
pwd: $BASE_STABLE
|
||||||
|
|
||||||
# VET
|
# VET
|
||||||
- gvm use stable && go vet ./...:
|
- gvm use stable && make vet:
|
||||||
pwd: $BASE_STABLE
|
pwd: $BASE_STABLE
|
||||||
|
|
||||||
# LINT
|
# LINT
|
||||||
- gvm use stable && test -z "$(golint ./... | grep -v Godeps/_workspace/src/ | tee /dev/stderr)":
|
- gvm use stable && make lint:
|
||||||
pwd: $BASE_STABLE
|
pwd: $BASE_STABLE
|
||||||
|
|
||||||
override:
|
override:
|
||||||
# Test stable, and report
|
# Test stable, and report
|
||||||
- gvm use stable; export ROOT_PACKAGE=$(go list .); go list -tags "$DOCKER_BUILDTAGS" ./... | xargs -L 1 -I{} bash -c 'export PACKAGE={}; godep go test -tags "$DOCKER_BUILDTAGS" -test.short -coverprofile=$GOPATH/src/$PACKAGE/coverage.out -coverpkg=$(./coverpkg.sh $PACKAGE $ROOT_PACKAGE) $PACKAGE':
|
- gvm use stable; export ROOT_PACKAGE=$(go list .); go list -tags "$DOCKER_BUILDTAGS" ./... | grep -v "/vendor/" | xargs -L 1 -I{} bash -c 'export PACKAGE={}; godep go test -tags "$DOCKER_BUILDTAGS" -test.short -coverprofile=$GOPATH/src/$PACKAGE/coverage.out -coverpkg=$(./coverpkg.sh $PACKAGE $ROOT_PACKAGE) $PACKAGE':
|
||||||
timeout: 600
|
timeout: 600
|
||||||
pwd: $BASE_STABLE
|
pwd: $BASE_STABLE
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue