-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #38 from iawells/doc-fix
Change server,cli make targets to build for running platform
- Loading branch information
Showing
4 changed files
with
40 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,35 @@ | ||
server := cacher-linux-x86_64 | ||
cli := cmd/cacherc/cacherc-linux-x86_64 | ||
binaries := ${server} ${cli} | ||
all: ${binaries} | ||
server := cacher | ||
cli := cmd/cacherc/cacherc | ||
|
||
.PHONY: server ${binaries} cli gen test | ||
server: ${server} | ||
.PHONY: all | ||
all: ${server} ${cli} | ||
|
||
.PHONY: cli ${cli} | ||
cli: ${cli} | ||
|
||
.PHONY: server ${server} | ||
server: ${server} | ||
|
||
${cli} ${server}: protos/cacher/cacher.pb.go | ||
CGO_ENABLED=0 GOOS=linux go build -o $@ ./$(@D) | ||
CGO_ENABLED=0 go build -o $@ ./$(@D) | ||
|
||
.PHONY: gen | ||
gen: protos/cacher/cacher.pb.go | ||
|
||
protos/cacher/cacher.pb.go: protos/cacher/cacher.proto | ||
go generate ./... | ||
goimports -w $@ | ||
|
||
.PHONY: test | ||
test: lint test-only | ||
|
||
.PHONY: test-only | ||
test-only: server | ||
CGO_ENABLED=1 go test -race -coverprofile=coverage.txt -covermode=atomic ${TEST_ARGS} ./... | ||
|
||
run: ${binaries} | ||
.PHONY: run | ||
run: | ||
docker-compose up --build server | ||
|
||
.PHONY: lint | ||
include lint.mk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters