forked from in-toto/witness
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
71856fd
commit a2e7565
Showing
1 changed file
with
9 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,24 @@ | ||
.PHONY: all build clean vet test docgen | ||
|
||
all: clean test build | ||
all: clean test build ## Run everything | ||
|
||
BINDIR := ./bin | ||
BINNAME := witness | ||
BUILDFLAGS := -trimpath | ||
|
||
clean: | ||
clean: ## Clean the binary directory | ||
rm -rf $(BINDIR) | ||
|
||
build: | ||
CGO_ENABLED=0 go build $(BUILDFLAGS) -o $(BINDIR)/$(BINNAME) ./main.go | ||
|
||
vet: | ||
vet: ## Run go vet | ||
go vet ./... | ||
|
||
test: | ||
go test ./... | ||
test: ## Run go tests | ||
go test -v -coverprofile=profile.cov -covermode=atomic ./... | ||
|
||
docgen: | ||
docgen: ## Generate the docs | ||
go run ./docgen | ||
|
||
help: ## Display this help screen | ||
@grep -h -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' |