-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
31 lines (23 loc) · 709 Bytes
/
Copy pathMakefile
File metadata and controls
31 lines (23 loc) · 709 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
BINARY := kubectl-pvu
MAIN := ./cmd/pvu
DIST_DIR := dist
VERSION ?= dev
COMMIT ?= $(shell git rev-parse --short HEAD 2>/dev/null || echo none)
DATE ?= $(shell date -u +%Y-%m-%dT%H:%M:%SZ)
LDFLAGS = -ldflags "\
-X github.com/kha7iq/pvu/internal/version.Version=$(VERSION) \
-X github.com/kha7iq/pvu/internal/version.Commit=$(COMMIT) \
-X github.com/kha7iq/pvu/internal/version.BuildDate=$(DATE)"
.PHONY: tidy build run tui release clean
tidy:
go mod tidy
build:
go build $(LDFLAGS) -o $(BINARY) $(MAIN)
run:
go run $(MAIN)
tui:
go run $(MAIN) -n default
release:
LOCAL_COMMIT=$(COMMIT) goreleaser release --snapshot --clean
clean:
rm -rf $(BINARY) $(DIST_DIR)