-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
52 lines (37 loc) · 1.05 KB
/
Makefile
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
BINARY=bin/tome-cli
all: build test
build: $(BINARY)
GO_FILES = $(shell find . -name '*.go' | grep -v /vendor/)
EMBED_FILES = $(shell find . -name '*.tmpl' | grep -v /vendor/)
$(BINARY): $(GO_FILES) $(EMBED_FILES)
go build -o bin/tome-cli
clean:
go clean
rm -f $(BINARY)
deps-chlogs:
go install github.com/goreleaser/chglog/cmd/chglog@latest
deps: deps-chlogs
go mod tidy
test: build test-go test-e2e
test/bin/wrapper.sh: build
@ $(BINARY) --executable wrapper.sh --root examples alias --output test/bin/wrapper.sh
test-e2e: test/bin/wrapper.sh build
@ deno test --allow-env --allow-read --allow-run test/*.ts
test-go:
go test ./...
run: build
$(BINARY) $(ARGS)
tag:
git tag v$(shell cat VERSION)
git push origin main
git push origin v$(shell cat VERSION)
# This works with versions while add --version isn't
chglog init
changelog: $(GO_FILES)
chglog init
chglog format --template repo > CHANGELOG.md
go run main.go docs && git add docs
docs: $(GO_FILES)
go run main.go docs
release: clean build test
goreleaser release --clean --verbose