-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
42 lines (35 loc) · 1021 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
37
38
39
40
41
42
require "rake/testtask"
require "vlad"
require "bundler/vlad"
Vlad.load(:app => :passenger, :scm => 'git', :config => 'deploy.rb')
desc "Create needed links"
remote_task :make_links do
current = "/Servers/variation_data/current"
shared = "/Servers/variation_data/shared"
cmds = [
"mkdir #{current}/public/images 2>/dev/null",
"ln -s #{shared}/families #{current}/public/images/families",
"ln -s #{shared}/positions #{current}/public/images/positions"
]
run cmds.join(' && ')
end
desc "Deploy this app"
task "vlad:deploy" => %w{
test
vlad:update
make_links
vlad:start_app
vlad:cleanup
}
desc "Deploy"
task :deploy => 'vlad:deploy'
Rake::TestTask.new do |t|
t.libs << 'spec'
t.pattern = "spec/*/*_spec.rb"
end
task :default => :test
desc "Copy image files to server"
task :images do
system("scp public/images/families/* rna.bgsu.edu:/Servers/variation_data/shared/families/")
system("scp public/images/positions/* rna.bgsu.edu:/Servers/variation_data/shared/positions/")
end