improve install from source
* Idempotent clone_and_build.sh does everything * Add documentation for how to build in Docker Had to sacrificy go generate because stringer apparently can't handle vendor directory used by go dep, fails with error on go generate rpc/frame_layer.go refs #37
This commit is contained in:
@@ -7,14 +7,14 @@ _TESTPKGS := $(ROOT) $(foreach p,$(SUBPKGS),$(ROOT)/$(p))
|
||||
|
||||
ARTIFACTDIR := artifacts
|
||||
|
||||
build: generate
|
||||
go build -o $(ARTIFACTDIR)/zrepl
|
||||
|
||||
generate:
|
||||
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
|
||||
|
||||
test:
|
||||
@for pkg in $(_TESTPKGS); do \
|
||||
echo "Testing $$pkg"; \
|
||||
@@ -39,7 +39,7 @@ cover: artifacts
|
||||
artifacts:
|
||||
mkdir artifacts
|
||||
|
||||
release: generate artifacts vet test
|
||||
release: artifacts vet test
|
||||
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