Merge pull request #269 from nalind/buildtags

Makefile: run "go" with $(BUILDTAGS)
This commit is contained in:
Antonio Murdaca 2016-12-08 17:10:45 +01:00 committed by GitHub
commit 1730fd0d5f

View File

@ -52,10 +52,10 @@ binary-static: cmd/skopeo
# Build w/o using Docker containers # Build w/o using Docker containers
binary-local: binary-local:
go build -ldflags "-X main.gitCommit=${GIT_COMMIT}" -gcflags "$(GOGCFLAGS)" -o skopeo ./cmd/skopeo go build -ldflags "-X main.gitCommit=${GIT_COMMIT}" -gcflags "$(GOGCFLAGS)" -tags "$(BUILDTAGS)" -o skopeo ./cmd/skopeo
binary-local-static: binary-local-static:
go build -ldflags "-extldflags \"-static\" -X main.gitCommit=${GIT_COMMIT}" -gcflags "$(GOGCFLAGS)" -o skopeo ./cmd/skopeo go build -ldflags "-extldflags \"-static\" -X main.gitCommit=${GIT_COMMIT}" -gcflags "$(GOGCFLAGS)" -tags "$(BUILDTAGS)" -o skopeo ./cmd/skopeo
build-container: build-container:
docker build ${DOCKER_BUILD_ARGS} -t "$(DOCKER_IMAGE)" . docker build ${DOCKER_BUILD_ARGS} -t "$(DOCKER_IMAGE)" .
@ -106,4 +106,4 @@ validate-local:
hack/make.sh validate-git-marks validate-gofmt validate-lint validate-vet hack/make.sh validate-git-marks validate-gofmt validate-lint validate-vet
test-unit-local: test-unit-local:
go test $$(go list -e ./... | grep -v '^github\.com/projectatomic/skopeo/\(integration\|vendor/.*\)$$') go test -tags "$(BUILDTAGS)" $$(go list -tags "$(BUILDTAGS)" -e ./... | grep -v '^github\.com/projectatomic/skopeo/\(integration\|vendor/.*\)$$')