-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
44 lines (37 loc) · 966 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
43
44
#!/bin/rake
# Needed for task desc rake/gem '= 0.9.2.2'
if defined? Rake::TaskManager.record_task_metadata
Rake::TaskManager.record_task_metadata = true
end
task :default => [:build]
desc "Download and unpack pediff"
task :download do |task|
puts task.comment
`git clone git.int.vgnett.no:/git/stp/pediff ./tmp`
`rm -rf ./tmp/.git`
`cp -r ./tmp/* .`
`rm -rf ./tmp`
end
desc "Install node dependencies"
task :npm do |task|
puts task.comment
sh "npm install"
end
desc "Run tasks"
task :run do |task|
puts task.comment
sh "./run-tasks.sh"
end
desc "Generate pediff report"
task :report do |task|
puts task.comment
sh "node_modules/casperjs/bin/casperjs report/report.js"
end
desc "Download and unpack, install npm deps, run, generate report"
task :build do |task|
puts task.comment
Rake::Task["download"].invoke
Rake::Task["npm"].invoke
Rake::Task["run"].invoke
Rake::Task["report"].invoke
end