forked from geeksam/think-like-a-git-dot-net
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSitefile
30 lines (23 loc) · 785 Bytes
/
Sitefile
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
task :default => :build
desc 'deploy the site to the webserver'
task :deploy => [:build, 'deploy:rsync']
SITE.user = 'geeksam'
SITE.host = 'think-like-a-git.net'
SITE.remote_dir = '/home/geeksam/think-like-a-git.net/'
def rerun_task(task_name)
Rake::Task[task_name].reenable
Rake::Task[task_name].invoke
end
namespace :sitemap do
desc 'generate sections from the sitemap (note that this will launch $EDITOR. a lot.)'
task :make_it_so do
sitemap = Sitemap.from_file('lib/sitemap.txt')
creator = Sitemap::SectionCreator.new
creator.traverse(sitemap)
rerun_task 'rebuild'
end
end
task :test do
Dir.glob(File.expand_path(File.join(File.dirname(__FILE__), *%w[test ** *_test.rb]))).each { |file| require file }
end
task :autobuild => :rebuild