Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 69 lines (45 sloc) 1.76 kB
135163e @trentm VERSIONS, cutarelease prep
authored
1
450e4eb @trentm start a test suite
authored
2 #---- Tools
3
4 TAP := ./node_modules/.bin/tap
5
6
d89444b @trentm Some jsstyle cleaning.
authored
7 #---- Files
8
9 JSSTYLE_FILES := $(shell find lib test tools -name *.js)
10
11
12
450e4eb @trentm start a test suite
authored
13 #---- Targets
14
135163e @trentm VERSIONS, cutarelease prep
authored
15 all:
16
450e4eb @trentm start a test suite
authored
17 # Ensure all version-carrying files have the same version.
18 .PHONY: versioncheck
135163e @trentm VERSIONS, cutarelease prep
authored
19 versioncheck:
20 [[ `cat package.json | json version` == `grep '^var VERSION' bin/bunyan | awk -F'"' '{print $$2}'` ]]
21 [[ `cat package.json | json version` == `grep '^var VERSION' lib/bunyan.js | awk -F'"' '{print $$2}'` ]]
22 @echo Version check ok.
23
450e4eb @trentm start a test suite
authored
24 .PHONY: cutarelease
135163e @trentm VERSIONS, cutarelease prep
authored
25 cutarelease: versioncheck
8b3bdef @trentm readme tweaks
authored
26 [[ ! -d tmp ]] # No 'tmp/' allowed: https://github.com/isaacs/npm/issues/2144 (fixed in npm 1.1.12 / node 0.6.14 I think)
e75bbb1 @trentm latest cutarelease has support for scripts
authored
27 ./tools/cutarelease.py -p bunyan -f package.json -f lib/bunyan.js -f bin/bunyan
135163e @trentm VERSIONS, cutarelease prep
authored
28
6f1433c @trentm 'make testall' to test against multiple node versions
authored
29
30 #---- test
31
450e4eb @trentm start a test suite
authored
32 .PHONY: test
33 test: $(TAP)
34 TAP=1 $(TAP) test/*.test.js
35
6f1433c @trentm 'make testall' to test against multiple node versions
authored
36 # Test will all node supported versions (presumes install locations I use on my machine).
37 .PHONY: testall
38 testall: test06 test07 testmaster
39
40 .PHONY: testmaster
41 testmaster:
42 @echo "# Test node master (with node `$(HOME)/opt/node-master/bin/node --version`)"
43 PATH="$(HOME)/opt/node-master/bin:$(PATH)" TAP=1 $(TAP) test/*.test.js
44
45 .PHONY: test07
46 test07:
47 @echo "# Test node 0.7.x (with node `$(HOME)/opt/node-0.7/bin/node --version`)"
48 PATH="$(HOME)/opt/node-0.7/bin:$(PATH)" TAP=1 $(TAP) test/*.test.js
49
50 .PHONY: test06
51 test06:
52 @echo "# Test node 0.6.x (with node `$(HOME)/opt/node-0.6/bin/node --version`)"
53 PATH="$(HOME)/opt/node-0.6/bin:$(PATH)" TAP=1 $(TAP) test/*.test.js
54
55
56 #---- check
57
d89444b @trentm Some jsstyle cleaning.
authored
58 .PHONY: check-jsstyle
59 check-jsstyle: $(JSSTYLE_FILES)
60 ./tools/jsstyle -o indent=2,doxygen,unparenthesized-return=0,blank-after-start-comment=0 $(JSSTYLE_FILES)
61
62 .PHONY: check
63 check: check-jsstyle
64 @echo "Check ok."
65
66 .PHONY: prepush
67 prepush: check test
68 @echo "Okay to push."
Something went wrong with that request. Please try again.