-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
22 lines (17 loc) · 1 KB
/
Makefile
File metadata and controls
22 lines (17 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# GlitchTip DSN baked into release binaries. Public key only — safe
# to commit (Sentry's documented model: DSNs ship in client bundles).
# Override at runtime via GROUNDS_SENTRY_DSN env var, or disable with
# GROUNDS_SENTRY_DISABLE=1. Set SENTRY_DSN=… on the make line to point
# a build at a personal GlitchTip.
SENTRY_DSN ?= https://ea5b2e86-1c42-4a4c-a227-35c8d7652e2e@glitch.grounds.gg/1
LDFLAGS := -X github.com/groundsgg/grounds-cli/internal/version.Version=$(shell git describe --tags --always --dirty 2>/dev/null || echo dev) \
-X github.com/groundsgg/grounds-cli/internal/version.Commit=$(shell git rev-parse --short HEAD 2>/dev/null || echo none) \
-X github.com/groundsgg/grounds-cli/internal/version.BuildAt=$(shell date -u +%Y-%m-%dT%H:%M:%SZ) \
-X github.com/groundsgg/grounds-cli/internal/observability.DSN=$(SENTRY_DSN)
build:
go build -ldflags "$(LDFLAGS)" -o ./bin/grounds ./cmd/grounds
test:
go test ./... -race -cover
vet:
go vet ./...
.PHONY: build test vet