-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
36 lines (26 loc) · 829 Bytes
/
Copy pathMakefile
File metadata and controls
36 lines (26 loc) · 829 Bytes
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
BINARY := ramify
VERSION := $(shell git describe --tags --always --dirty 2>/dev/null || echo dev)
.PHONY: build test test-integration lint fmt vet run clean hooks
build:
go build -ldflags "-X main.version=$(VERSION)" -o $(BINARY) ./cmd/ramify
test:
go test ./... -race
test-integration:
go test -tags integration ./... -v
lint:
golangci-lint run
# Auto-fixes what golangci-lint safely can: gofmt/goimports formatting and
# golines line-wrapping for anything over lll's 100-char limit. Review the
# diff before committing - golines occasionally wraps in a style you'd
# write differently by hand.
fmt:
golangci-lint run --fix
vet:
go vet ./...
run: build
./$(BINARY) $(ARGS)
clean:
rm -f $(BINARY)
# Enable the tracked git hooks (runs lint/format before each commit).
hooks:
git config core.hooksPath .githooks