-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
32 lines (23 loc) · 712 Bytes
/
Copy pathMakefile
File metadata and controls
32 lines (23 loc) · 712 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
.PHONY: build test fmt lint e2e contract install clean
VERSION ?= dev
LDFLAGS := -s -w -X main.version=$(VERSION)
build:
CGO_ENABLED=0 go build -ldflags "$(LDFLAGS)" -o hand .
test:
go test -race ./...
fmt:
gofmt -w .
lint:
@output=$$(gofmt -l .); if [ -n "$$output" ]; then echo "Files not formatted:"; echo "$$output"; exit 1; fi
go vet ./...
golangci-lint run
go run ./tools/commentlint .
e2e:
go test -tags=e2e -timeout=10m ./tests/e2e/...
# Runs against the real herdr, treehouse and gh, skipping whichever is absent.
contract:
go test -tags=contract -count=1 -timeout=10m ./tests/contract/...
install: build
cp hand $(GOPATH)/bin/ 2>/dev/null || cp hand ~/.local/bin/
clean:
rm -f hand