forked from vphilomin/app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
54 lines (45 loc) · 1.33 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
require 'rake'
require 'rake/clean'
require 'fileutils'
require 'erb'
require 'configatron'
Dir.glob("build/support/**/*.rb").each do|item|
require File.expand_path(item)
end
user_profile = "#{File.basename(`whoami`.chomp)}.settings"
unless File.exist?(user_profile)
FileUtils.cp 'settings_template', user_profile
p "You may need to change the settings in the file #{user_profile}"
end
load user_profile
config_files = FileList.new("source/config/*.erb")
[configatron.artifacts_dir, configatron.specs.dir].each do |item|
CLEAN.include(item)
end
Rake::Task['expand_all_template_files'].invoke
task :default => ["specs:run"]
task :init => :clean do
[
configatron.artifacts_dir,
configatron.specs.dir,
configatron.specs.report_dir,
configatron.web_staging_dir
# configatron.web_log_dir
# configatron.web_trace_dir
].each do |folder|
FileUtils.mkdir_p folder if ! File.exists?(folder)
end
end
task :copy_config_files do
config_files.each do |file|
[configatron.artifacts_dir,configatron.app_dir].each do|folder|
FileUtils.cp(file.name_without_template_extension,
folder.join(file.base_name_without_extension))
end
end
end
task :kill_iis do
%W/iisexpress cmd #{configatron.browser.base_name_without_extension}/.each do|process|
system("taskkill /IM #{process}.exe")
end
end