forked from Wantworthy/dynode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
36 lines (29 loc) · 819 Bytes
/
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
REPORTER = spec
ui = bdd
VERSION := $(shell cat package.json | grep version | grep -o -E '[0-9]+\.[0-9]+\.[0-9]+')
UNITTESTFILES := $(shell find test/unit -name '*-test.js')
INTEGRATIONTESTFILES := $(shell find test/integration -name '*-test.js')
test: test-unit
test-all: test-unit test-integration
test-unit:
@./node_modules/.bin/mocha \
--ui $(ui) \
--reporter $(REPORTER) \
$(UNITTESTFILES)
test-integration:
@./node_modules/.bin/mocha \
--ui $(ui) \
--reporter $(REPORTER) \
$(INTEGRATIONTESTFILES)
test-spec:
@./node_modules/.bin/mocha \
--ui bdd \
--reporter spec \
--grep "$(grep)" \
$(UNITTESTFILES) $(INTEGRATIONTESTFILES)
release:
git tag -a v$(VERSION) -m 'release version $(VERSION)'
git push
git push --tags
npm publish .
.PHONY: test test-all test-unit test-integration