-
Notifications
You must be signed in to change notification settings - Fork 24
/
Makefile
39 lines (32 loc) · 702 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
.DEFAULT_TARGET=help
VERSION:=$(shell cat VERSION)
## help: Display list of commands
.PHONY: help
help: Makefile
@sed -n 's|^##||p' $< | column -t -s ':' | sed -e 's|^| |'
## build: Build tfautomv binary
.PHONY: build
build: fmt vet
go build -o bin/tfautomv
## fmt: Format source code
.PHONY: fmt
fmt:
go fmt ./...
## vet: Vet source code
.PHONY: vet
vet:
go vet ./...
## test: Run unit tests
.PHONY: test
test:
go test ./pkg/... -cover
## test-e2e: Run end-to-end tests
.PHONY: test-e2e
test-e2e:
go test ./test/e2e/... -v
## release: Release a new version
.PHONY: release
release: test
git tag -a "$(VERSION)" -m "$(VERSION)"
git push origin "$(VERSION)"
goreleaser release --rm-dist