Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 56 lines (42 sloc) 1.121 kb
cfb5530 @majek make clean should do something
majek authored
1 .PHONY: all serve clean
c37b9b5 @majek Use makefile instead of a script
majek authored
2
2b969e5 @majek Use the npm-installed coffee, rather than relying on a global coffee
majek authored
3 COFFEE:=./node_modules/.bin/coffee
4
2eebafd @majek Host test_server from sockjs-node, not sockjs-client.
majek authored
5 #### General
6
7 all: build
8
9 build: src/*coffee
2b969e5 @majek Use the npm-installed coffee, rather than relying on a global coffee
majek authored
10 @$(COFFEE) -v > /dev/null
11 $(COFFEE) -o lib/ -c src/*.coffee
c37b9b5 @majek Use makefile instead of a script
majek authored
12
cfb5530 @majek make clean should do something
majek authored
13 clean:
14 rm -f lib/*.js
15
16
2eebafd @majek Host test_server from sockjs-node, not sockjs-client.
majek authored
17 #### Testing
18
204b18f @brycekahle Fix websocket bad json tests
brycekahle authored
19 test_server: build
20 node tests/test_server/server.js
2eebafd @majek Host test_server from sockjs-node, not sockjs-client.
majek authored
21
22 serve:
23 @if [ -e .pidfile.pid ]; then \
24 kill `cat .pidfile.pid`; \
25 rm .pidfile.pid; \
26 fi
27
28 @while [ 1 ]; do \
29 make build; \
30 echo " [*] Running http server"; \
31 make test_server & \
32 SRVPID=$$!; \
33 echo $$SRVPID > .pidfile.pid; \
34 echo " [*] Server pid: $$SRVPID"; \
35 inotifywait -r -q -e modify .; \
36 kill `cat .pidfile.pid`; \
37 rm -f .pidfile.pid; \
38 sleep 0.1; \
39 done
40
41 #### Release process
f742077 @majek Not including compiled javascript is not a good idea
majek authored
42 # 1) commit everything
43 # 2) amend version in package.json
44 # 3) run 'make tag' and run suggested 'git push' variants
45 # 4) run 'npm publish'
46
e3585fd @majek Preparing for first release
majek authored
47 RVER:=$(shell grep "version" package.json|tr '\t"' ' \t'|cut -f 4)
48 VER:=$(shell ./VERSION-GEN)
49
50 .PHONY: tag
51 tag: all
38d0191 @majek Added changelog
majek authored
52 git commit $(TAG_OPTS) package.json Changelog -m "Release $(RVER)"
8f0f9e3 @majek don't sign
majek authored
53 git tag v$(RVER) -m "Release $(RVER)"
e3585fd @majek Preparing for first release
majek authored
54 @echo ' [*] Now run'
55 @echo 'git push; git push --tag'
Something went wrong with that request. Please try again.