-
Notifications
You must be signed in to change notification settings - Fork 21
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
Showing
1 changed file
with
36 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
MAKEFLAGS += --silent | ||
|
||
all: clean format test build | ||
|
||
## help: Prints a list of available build targets. | ||
help: | ||
echo "Usage: make <OPTIONS> ... <TARGETS>" | ||
echo "" | ||
echo "Available targets are:" | ||
echo '' | ||
sed -n 's/^##//p' ${PWD}/Makefile | column -t -s ':' | sed -e 's/^/ /' | ||
echo | ||
echo "Targets run by default are: `sed -n 's/^all: //p' ./Makefile | sed -e 's/ /, /g' | sed -e 's/\(.*\), /\1, and /'`" | ||
|
||
## clean: Removes any previously created build artifacts. | ||
clean: | ||
rm -f ./xk6 | ||
rm -f ./k6 | ||
|
||
## build: Builds the 'xk6' binary. | ||
build: | ||
go build -work ./cmd/xk6 | ||
|
||
## format: Applies Go formatting to code. | ||
format: | ||
go fmt ./... | ||
|
||
## test: Executes any unit tests. | ||
test: | ||
go test -cover -race ./... | ||
|
||
## vendor: Pulls source for external dependencies. | ||
vendor: | ||
go mod vendor | ||
|
||
.PHONY: build clean format help test vendor |