forked from redis/redis-io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
36 lines (29 loc) · 775 Bytes
/
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
task :default => :test
task :test do
require "cutest"
Cutest.run(Dir["test/**/*.rb"])
end
task :formatting do
require "cutest"
Cutest.run(Dir["test/formatting.rb"])
end
task :update do
sh "rm -rf redis-doc"
sh "git clone -q --depth 1 git://github.com/redis/redis-doc.git"
sh "rm -rf redis-doc/.git"
end
desc "Deploy"
task :deploy do
script = <<-EOS
cd ~/redis-doc
git pull
cd ~/redis-io
git pull
rvm 1.9.2 gem install dep --no-ri --no-rdoc
(rvm 1.9.2 exec dep check || rvm 1.9.2 exec dep install)
rvm 1.9.2 exec compass compile -c config/sass.rb views/styles.sass
kill -s INT $(cat log/redis-io.pid)
rvm 1.9.2 exec unicorn -D -c unicorn.rb -E production
EOS
sh "ssh redis-io '#{script.split("\n").map(&:strip).join(" && ")}'"
end