-
Notifications
You must be signed in to change notification settings - Fork 32
/
Rakefile
55 lines (44 loc) · 1.36 KB
/
Rakefile
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
50
51
52
53
54
55
###############
## see rake rule on: http://jasonseifer.com/2010/04/06/rake-tutorial
###############
desc "display help infomations"
task :default do
sh "rake -T"
end
desc "start a demon erlang node by heart"
task :start do
#
# Include `pwd` in the path to ebin so code:priv_dir works. See:
#
# http://erlang.org/pipermail/erlang-questions/2011-October/062024.html
#
sh "exec erl -heart -env HEART_COMMAND 'rake restart' -sname zhongwencool -setcookie zhongwencool -pa `pwd`/ebin deps/*/ebin -detached -noinput -noshell -s recon_web"
end
desc "stop erlang node normal"
task :stop do
sh "erl -noshell -sname temp_control -setcookie zhongwencool -eval \"rpc:call(zhongwencool@localhost, init, stop, [])\" -s init stop"
end
desc "start debug module lager:info"
task :debug do
sh "rebar co&& exec erl -sname zhongwencool -setcookie zhongwencool -pa `pwd`/ebin deps/*/ebin -boot start_sasl -s recon_web start debug"
end
desc "remsh mode shell"
task :remsh do
sh "erl -setcookie zhongwencool -remsh zhongwencool@localhost -sname remsh_tmp"
end
desc "restart node"
task :restart =>[:stop,:start] do
puts "restart ok"
end
desc "rebar eunit skip_deps=true"
task :test do
sh "rebar eunit skip_deps=true"
end
desc "rebar co"
task :co do
sh "rebar co"
end
desc "erl -pa ../recon_web/ebin deps/*/ebin"
task :shell do
sh "erl -pa ../recon_web/ebin deps/*/ebin ./"
end