-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
36 lines (26 loc) · 1020 Bytes
/
Copy pathMakefile
File metadata and controls
36 lines (26 loc) · 1020 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
33
34
35
36
.PHONY: build test integration-test check fmt vet release-snapshot web-build web-test
# A tagged checkout gets the nearest semantic Git description. Repositories
# without a reachable tag leave this empty so Go's embedded VCS revision and
# dirty state remain the authoritative development identity.
VERSION ?= $(shell git describe --tags --dirty 2>/dev/null)
LDFLAGS := $(if $(VERSION),-X github.com/merefield/codexometer/internal/version.buildVersion=$(VERSION),)
build:
go build -trimpath -ldflags "$(LDFLAGS)" -o codexometer .
test:
go test ./...
integration-test:
bats test/install-release.bats
check: vet test integration-test
fmt:
go fmt ./...
vet:
go vet ./...
release-snapshot:
goreleaser release --snapshot --clean --skip=publish
# Only frontend contributors need Node. Generated assets are committed for
# ordinary Go builds, go install and all six GoReleaser distributions.
web-build:
cd web && npm ci && npm run check && npm run build
web-test: web-build
$(MAKE) build
cd web && npm test