-
Notifications
You must be signed in to change notification settings - Fork 4
/
makefile
82 lines (59 loc) · 1.61 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
.PHONY: test
EXEC:=fireward
test:
stack test --file-watch
exec-path:
@echo "$(shell stack path --dist-dir)/build/fireward/fireward"
tmp/try.rules: ./.stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/fireward/fireward
tmp/try.rules: $(file)
test -r "$(file)"
stack exec fireward -- -i $(file) > tmp/try.rules
cat tmp/try.rules
try: $(file)
stack build
test -r "$(file)"
stack exec fireward -- -i $(file)
prefix?=/usr/local/bin
PREFIX:=$(prefix)
LOCAL_PATH:=$(shell stack path --local-bin)
install:
stack install && cp $(LOCAL_PATH)/$(EXEC) $(prefix)/
VERSION=$(shell stack exec fireward -- -V)
buildtest:
stack build
# stack test
V=$(shell stack exec fireward -- -V)
tag:
git tag -a "$(V)"
release:
make buildtest
git push origin master # prevent travis from building anything but the tag
make tag
git push origin master --follow-tags
v?=$(V)
publish:
cd npm-bin && ./publish.sh
z:
echo $(shell date +%s)
BRANCH:=$(shell git branch --show-current)
release-beta:
[ "$(BRANCH)" != "master" ]
make buildtest
git push origin $(BRANCH) # prevent travis from building anything but the tag
git tag -a "$(V)-beta.$(shell date +%s)"
git push origin $(BRANCH) --follow-tags
publish-beta:
cd npm-bin && ./publish.sh beta
workExe:=$(shell stack path --dist-dir)/build/fireward/fireward
watch-complex:
watch -i 1 make .test-complex
.test-complex: $(workExe)
@stack build
touch .test-complex
$(workExe) -i ./test/fixtures/indent.ward
smoke-test:
cat examples/smoke-test.ward | stack exec fireward > /dev/null
bench:
hyperfine 'fireward -i examples/smoke-test.ward'
e2e:
cd ./integration && npm test