Commit f0e8c8ecb19fa0d771c9247794ecba7a8cc6724c
1 parent
d74fdaec
Exists in
master
and in
28 other branches
Ensure that po4a.conf file doesn't have the same xhtml file twice
(ActionItem2215)
Showing
1 changed file
with
2 additions
and
3 deletions
Show diff stats
lib/tasks/doc.rake
@@ -13,7 +13,7 @@ namespace :noosfero do | @@ -13,7 +13,7 @@ namespace :noosfero do | ||
13 | [File.join(RAILS_ROOT, 'doc/noosfero/plugins/index.textile')] | 13 | [File.join(RAILS_ROOT, 'doc/noosfero/plugins/index.textile')] |
14 | end | 14 | end |
15 | input = Dir.glob('doc/noosfero/**/*.textile') + plugins_textiles.map{|i| "doc/noosfero/plugins/#{File.basename(i)}"} | 15 | input = Dir.glob('doc/noosfero/**/*.textile') + plugins_textiles.map{|i| "doc/noosfero/plugins/#{File.basename(i)}"} |
16 | - topics_xhtml = input.map { |item| item.sub('.textile', '.en.xhtml') } | 16 | + topics_xhtml = input.map { |item| item.sub('.textile', '.en.xhtml') }.uniq |
17 | sections = Dir.glob('doc/noosfero/*').select {|item| File.directory?(item) } | 17 | sections = Dir.glob('doc/noosfero/*').select {|item| File.directory?(item) } |
18 | toc_sections = sections.map {|item| File.join(item, 'toc.en.xhtml')} | 18 | toc_sections = sections.map {|item| File.join(item, 'toc.en.xhtml')} |
19 | index_sections = sections.map {|item| File.join(item, 'index.en.xhtml')} | 19 | index_sections = sections.map {|item| File.join(item, 'index.en.xhtml')} |
@@ -104,11 +104,10 @@ namespace :noosfero do | @@ -104,11 +104,10 @@ namespace :noosfero do | ||
104 | desc "Build Noosfero online documentation" | 104 | desc "Build Noosfero online documentation" |
105 | task :build => [:link_plugins_textiles, po4a_conf] do | 105 | task :build => [:link_plugins_textiles, po4a_conf] do |
106 | sh "po4a #{po4a_conf}" | 106 | sh "po4a #{po4a_conf}" |
107 | - Rake::Task['noosfero:doc:unlink_plugins_textiles'].invoke | ||
108 | end | 107 | end |
109 | 108 | ||
110 | desc "Cleans Noosfero online documentation" | 109 | desc "Cleans Noosfero online documentation" |
111 | - task :clean do | 110 | + task :clean => :unlink_plugins_textiles do |
112 | sh 'rm -f doc/noosfero/*.xhtml' | 111 | sh 'rm -f doc/noosfero/*.xhtml' |
113 | sh 'rm -f doc/noosfero/*/*.xhtml' | 112 | sh 'rm -f doc/noosfero/*/*.xhtml' |
114 | rm_f po4a_conf | 113 | rm_f po4a_conf |