-
Notifications
You must be signed in to change notification settings - Fork 18
/
Makefile
49 lines (32 loc) · 1.06 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
COFFEE = node_modules/.bin/coffee
MOCHA = node_modules/.bin/mocha --compilers coffee:coffee-script/register --reporter spec
XYZ = node_modules/.bin/xyz --message X.Y.Z --tag X.Y.Z --repo git@github.com:davidchambers/tutor.git --script scripts/prepublish
SRC = $(shell find src -name '*.coffee')
LIB = $(patsubst src/%.coffee,lib/%.js,$(SRC))
FIXTURES = $(patsubst %,%.html,$(shell find test/fixtures -type f -not -name '*.html'))
.PHONY: all
all: $(LIB)
lib/%.js: src/%.coffee
$(COFFEE) --compile --output $(@D) -- $<
.PHONY: fixtures
fixtures: $(FIXTURES)
test/fixtures/%.html: test/fixtures/%
xargs curl --location --silent -- <$< >$@
.PHONY: clean
clean:
@rm -f -- $(LIB)
@rm -f -- $(FIXTURES)
.PHONY: release-major release-minor release-patch
release-major release-minor release-patch:
@$(XYZ) --increment $(@:release-%=%)
.PHONY: setup
setup:
npm install
make clean
git update-index --assume-unchanged -- $(LIB)
.PHONY: test
test: all
$(MOCHA) --grep '^\$$' --invert --timeout 15000
.PHONY: testcli
testcli: all
$(MOCHA) --grep '^\$$' --timeout 30000