build: target for go library dependencies
Didn't notice it because vendor/ was already populated on my dev machine, but did notice it in Docker build. Docker build now consumes devsetup like regular user, so this should catch future problems. Remove remaining curl|shit functionality from lazy.sh (no checkout logic needed anymore). refs #35
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
.PHONY: generate build test vet cover release docs docs-clean clean release-bins
|
||||
.PHONY: generate build test vet cover release docs docs-clean clean release-bins vendordeps
|
||||
.DEFAULT_GOAL := build
|
||||
|
||||
ROOT := github.com/zrepl/zrepl
|
||||
@@ -18,13 +18,17 @@ GO_LDFLAGS := "-X github.com/zrepl/zrepl/cmd.zreplVersion=$(ZREPL_VERSION)"
|
||||
|
||||
GO_BUILD := go build -ldflags $(GO_LDFLAGS)
|
||||
|
||||
vendordeps:
|
||||
dep ensure -v -vendor-only
|
||||
|
||||
generate: #not part of the build, must do that manually
|
||||
@for pkg in $(_TESTPKGS); do\
|
||||
go generate "$$pkg" || exit 1; \
|
||||
done;
|
||||
|
||||
build:
|
||||
$(GO_BUILD) -o "$(ARTIFACTDIR)/zrepl"
|
||||
@echo "INFO: In case of missing dependencies, run 'make vendordeps'"
|
||||
$(GO_BUILD) -o "$(ARTIFACTDIR)/zrepl"
|
||||
|
||||
test:
|
||||
@for pkg in $(_TESTPKGS); do \
|
||||
@@ -64,6 +68,7 @@ docs-clean:
|
||||
BUILDDIR=../artifacts/docs
|
||||
|
||||
release-bins: $(ARTIFACTDIR) vet test
|
||||
@echo "INFO: In case of missing dependencies, run 'make vendordeps'"
|
||||
GOOS=linux GOARCH=amd64 $(GO_BUILD) -o "$(ARTIFACTDIR)/zrepl-linux-amd64"
|
||||
GOOS=freebsd GOARCH=amd64 $(GO_BUILD) -o "$(ARTIFACTDIR)/zrepl-freebsd-amd64"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user