-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
44 lines (34 loc) · 787 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
41
42
43
44
# Largely inspired by https://danishpraka.sh/2019/12/07/using-makefiles-for-go.html
GO_ARGS=-race
GO111MODULES=on
.PHONY: build
build:
## build: build this application
go build ${GO_ARGS} -o znaczek github.com/jpalczewski/znaczek/cmd/znaczek
.PHONY: clean
clean:
## clean: clean the application
go clean
.PHONY: setup
setup:
## setup: setup go modules
@go mod tidy \
&& go mod vendor
.PHONY: test
test:
## test: run tests
go test -v -count=1 -race ./...
.PHONY: install
install:
## install: install the binary
go install
.PHONY: test-release
test-release:
goreleaser --snapshot --skip-publish --rm-dist
.PHONY:
goreleaser
.PHONY: help
## help: prints this help message
help:
@echo "Usage:"
@sed -n 's/^##//p' ${MAKEFILE_LIST} | column -t -s ':' | sed -e 's/^/ /'