-
Notifications
You must be signed in to change notification settings - Fork 21
/
Makefile
40 lines (31 loc) · 941 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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
## snapshot: Create snapshot build using goreleaser.
snapshot:
goreleaser build --clean --snapshot --single-target -o 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