-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Makefile: removed unnecessary targets, fixed apitest
- Loading branch information
1 parent
66c865b
commit 634e16e
Showing
4 changed files
with
7 additions
and
48 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,44 +1,16 @@ | ||
GOOS ?= linux | ||
GOARCH ?= amd64 | ||
GIT_COMMIT_SHA ?= $(shell git rev-list -1 HEAD) | ||
LD_FLAGS = -ldflags="-X main.buildCommit=${GIT_COMMIT_SHA}" | ||
|
||
all: test build apitest | ||
|
||
deps: | ||
go mod download github.com/clbanning/mxj | ||
go get ./... | ||
|
||
vet: | ||
test: | ||
go vet ./... | ||
|
||
fmt: | ||
go fmt ./... | ||
|
||
test: deps fmt vet | ||
go test -race -cover ./... | ||
|
||
webtest: | ||
go test -coverprofile=testcoverage.out | ||
go tool cover -html=testcoverage.out | ||
|
||
apitest: | ||
apitest: build | ||
./apitest -c apitest.test.yml --stop-on-fail -d test/ | ||
|
||
gox: deps | ||
go get github.com/mitchellh/gox | ||
gox ${LDFLAGS} -parallel=4 -output="./bin/apitest_{{.OS}}_{{.Arch}}" | ||
|
||
clean: | ||
rm -rfv ./apitest ./bin/* ./testcoverage.out | ||
|
||
ci: deps | ||
go build $(LD_FLAGS) -o bin/apitest_$(GOOS)_$(GOARCH) *.go | ||
|
||
build: deps | ||
go build $(LD_FLAGS) | ||
|
||
build-linux: deps | ||
GOOS=linux GOARCH=amd64 go build -o apitest-linux | ||
build: | ||
go build | ||
|
||
.PHONY: all test apitest webtest gox build clean | ||
.PHONY: all test apitest build clean |
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