-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile
44 lines (39 loc) · 1.03 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
version = $(shell cat package.json | grep version | awk -F'"' '{print $$4}')
TESTS = $(shell ls -S `find test -type f -name "*.test.js" -print`)
HG_SSH_DIR = test/hgssh
HG_HTTP_DIR = test/hghttp
REPORTER = spec
TIMEOUT = 15000
MOCHA_OPTS =
lint:
@npm run lint
test: lint
@./node_modules/.bin/istanbul cover \
./node_modules/.bin/_mocha \
-- \
--harmony \
--reporter $(REPORTER) \
--timeout $(TIMEOUT) \
--require should \
--inline-diffs \
$(TESTS)
testHg:
@if [ ! -d $(HG_SSH_DIR) ]; then \
mkdir -p $(HG_SSH_DIR); \
cd $(HG_SSH_DIR); \
hg init; \
echo [paths] >> .hg/hgrc; \
echo default = ssh://[email protected]/hotoo/gitopen >> .hg/hgrc; \
fi
@if [ ! -d $(HG_HTTP_DIR) ]; then \
mkdir -p $(HG_HTTP_DIR); \
cd $(HG_HTTP_DIR); \
hg init; \
echo [paths] >> .hg/hgrc; \
echo default = https://[email protected]/hotoo/gitopen >> .hg/hgrc; \
fi
publish:
@npm publish --registry https://registry.npmjs.org/ --access public
@git tag $(version)
@git push origin $(version)
.PHONY: test publish coverage