-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathMakefile
More file actions
25 lines (18 loc) · 686 Bytes
/
Copy pathMakefile
File metadata and controls
25 lines (18 loc) · 686 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
# Local dev helper. The authoritative release build lives in
# .github/workflows/release.yml. version.txt is the single source of truth;
# `make build` injects it the same way CI does. A plain `go build` (no ldflags)
# leaves VERSION as "dev" by design.
VERSION := $(shell tr -d '[:space:]' < version.txt)
LDFLAGS := -s -w -X main.VERSION=$(VERSION)
.PHONY: build test vet fmt-check clean
build:
CGO_ENABLED=0 go build -trimpath -ldflags "$(LDFLAGS)" -o basicToOauth .
test:
go test -race ./...
vet:
go vet ./...
fmt-check:
@out="$$(gofmt -l .)"; \
if [ -n "$$out" ]; then echo "gofmt needed on:"; echo "$$out"; exit 1; fi
clean:
rm -rf build basicToOauth basicToOauth.exe