-
Notifications
You must be signed in to change notification settings - Fork 8
/
Rakefile
72 lines (53 loc) · 1.6 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
$:.unshift(File.dirname(__FILE__))
require 'listen'
begin
require 'nanoc3/tasks'
rescue LoadError
end
#task :upload => :compile do
#
# account = '[email protected]'
# webdir = '/var/www/gforge-projects/ruote/'
# sh "rsync -azv -e ssh --exclude '*.swp' output/ #{account}:#{webdir}"
#
# webdir = '/var/www/gforge-projects/openwferu/'
# sh "rsync -azv -e ssh --exclude '*.swp' output/ #{account}:#{webdir}"
#end
task :compile do
exec 'bundle exec nanoc co'
end
task :co => :compile
task :aco do
#exec "nanoc aco" # <--- too slow, can't wait nanoc 3.2
queue = Queue.new
Thread.new do
loop { queue.pop; sh 'bundle exec nanoc co'; queue.clear }
end
Thread.new do
Listen.to('content', :filter => /\.txt$/) do |mod, add, rem|
queue << :doit
end
end
sh 'bundle exec nanoc view'
end
task :rdoc do
#sh "./scripts/ep2tex.rb"
load 'scripts/ep2tex.rb'
end
task :deploy do
#sh 'bundle exec rake deploy:rsync'
#sh 'bundle exec rake deploy:rsync config=openwferu'
#sh 'bundle exec rake deploy:rsync config=lambda'
#
# at some point, these ceased to work, so, went manual
sh 'bundle exec nanoc co'
out = File.expand_path(File.dirname(__FILE__)) + '/output/'
opts = '-glPrvz -e ssh --exclude=".hg" --exclude=".svn" --exclude=".git"'
sh "rsync #{opts} #{out} lin:www/ruote"
#
# hosted at ruote.io/index.html
#sh "rsync #{opts} #{out} [email protected]:/var/www/gforge-projects/ruote"
#sh "rsync #{opts} #{out} [email protected]:/var/www/gforge-projects/openwferu"
#
# unfortunately rubyforge.org seems down very often these days...
end