-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
36 lines (28 loc) · 689 Bytes
/
Makefile
File metadata and controls
36 lines (28 loc) · 689 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
SRC := $(shell git ls-files '*.go')
TRANSCRIPTS := $(wildcard transcripts/*)
STATIC := $(wildcard static/*)
.PHONY: all
all: git-ls
git-ls: $(SRC)
go build
# depends on golangci-lint:
# https://golangci-lint.run/welcome/install/#local-installation
.PHONY: lint
lint:
@if [ -n "$$(go fmt ./...)" ]; then \
echo "Error: The following files were reformatted. Please commit the changes:"; \
go fmt ./...; \
exit 1; \
fi
golangci-lint run
.PHONY: test
test:
go test ./...
.PHONY: publish
publish:
make lint test && bin/release.sh
_site/index.html: README.md $(TRANSCRIPTS) $(STATIC)
@./tools/build-site.sh
.PHONY: serve-site
serve-site: _site/index.html
devd -ol ./_site/