-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathMakefile
More file actions
28 lines (23 loc) · 780 Bytes
/
Makefile
File metadata and controls
28 lines (23 loc) · 780 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
EXAMPLES_FILE=tools/renderer/examples.js
GITHUB_PAGES_FOLDER=tools/renderer
GITHUB_PAGES_BRANCH=gh-pages
deploy:
@echo "// This file is autogenerated, do not modify it directly." > $(EXAMPLES_FILE); \
echo "var examples = {}" >> $(EXAMPLES_FILE); \
for f in data/*.json; do \
c=`go run main.go -f $$f`; \
echo "examples['$$f'] = '$$c';" >> $(EXAMPLES_FILE); \
done; \
echo "var examples_rows = {}" >> $(EXAMPLES_FILE); \
for f in data/*.json; do \
c=`go run main.go -f $$f --rows`; \
echo "examples_rows['$$f'] = '$$c';" >> $(EXAMPLES_FILE); \
done
github: deploy
ghp-import -b $(GITHUB_PAGES_BRANCH) -p $(GITHUB_PAGES_FOLDER)
test:
go test ./...
cover:
go test -coverprofile cover.out ./git2graph/
go tool cover -html=cover.out
.PHONY: deploy github test