Skip to content

Fix list inclusions after .adoc renaming #2014

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: gh-pages
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions script/update-docs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ def index_doc(filter_tags, doc_list, get_content)
end
generated = cmd_list.keys.inject({}) do |list, category|
links = cmd_list[category].map do |cmd, attr|
cmd_file = tag_files.detect { |ent| ent.first == "Documentation/#{cmd}.txt" }
cmd_file = tag_files.detect { |ent| ent.first == "Documentation/#{cmd}.#{ext}" }
next unless cmd_file

content = get_content.call(cmd_file[1])
Expand All @@ -387,7 +387,7 @@ def index_doc(filter_tags, doc_list, get_content)
"linkgit:#{cmd}[#{section}]::\n\t#{attr == 'deprecated' ? '(deprecated) ' : ''}#{match[1]}\n"
end
end
list.merge!("Documentation/cmds-#{category}.txt" => links.compact.join("\n"))
list.merge!("Documentation/cmds-#{category}.#{ext}" => links.compact.join("\n"))
end

tools = tag_files.select { |ent| ent.first =~ /^mergetools\// }.map do |entry|
Expand All @@ -400,8 +400,8 @@ def index_doc(filter_tags, doc_list, get_content)
end

can_merge, can_diff = tools.transpose.map(&:join)
generated["Documentation/mergetools-diff.txt"] = can_diff
generated["Documentation/mergetools-merge.txt"] = can_merge
generated["Documentation/mergetools-diff.#{ext}"] = can_diff
generated["Documentation/mergetools-merge.#{ext}"] = can_merge

get_content_f = proc do |name|
content_file = tag_files.detect { |ent| ent.first == name }
Expand Down
Loading