-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
32 lines (22 loc) · 707 Bytes
/
Copy pathMakefile
File metadata and controls
32 lines (22 loc) · 707 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 install test fmt vet tidy check clean assets
VERSION ?= $(shell git describe --tags --always --dirty 2>/dev/null || echo dev)
COMMIT ?= $(shell git rev-parse --short HEAD 2>/dev/null || echo none)
DATE ?= $(shell date -u +%Y-%m-%dT%H:%M:%SZ)
LDFLAGS ?= -X main.version=$(VERSION) -X main.commit=$(COMMIT) -X main.date=$(DATE)
build:
go build -ldflags "$(LDFLAGS)" -o bin/rdrop ./cmd/rdrop
install:
go install -ldflags "$(LDFLAGS)" ./cmd/rdrop
test:
go test ./...
fmt:
gofmt -w ./cmd ./internal ./scripts
vet:
go vet ./...
tidy:
go mod tidy
check: fmt tidy vet test build
assets:
go run ./scripts/render-terminal-demo.go > docs/assets/terminal-demo.svg
clean:
rm -rf bin dist