Skip to content

Commit

Permalink
Merge pull request #3928 from rubygems/fix_man_check
Browse files Browse the repository at this point in the history
Readd man pages index
  • Loading branch information
deivid-rodriguez committed Sep 4, 2020
2 parents b7cabde + 985b316 commit be3daef
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 14 deletions.
1 change: 1 addition & 0 deletions Manifest.txt
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ bundler/man/bundle.1
bundler/man/bundle.1.ronn
bundler/man/gemfile.5
bundler/man/gemfile.5.ronn
bundler/man/index.txt
hide_lib_for_update/note.txt
lib/rubygems.rb
lib/rubygems/available_set.rb
Expand Down
30 changes: 16 additions & 14 deletions bundler/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -128,20 +128,22 @@ namespace :man do

desc "Verify man pages are in sync"
task :check => :build do
sh("git diff --quiet --ignore-all-space man") do |outcome, _|
if outcome
puts
puts "Manpages are in sync!"
puts
else
sh("GIT_PAGER=cat git diff --ignore-all-space man")

puts
puts "Man pages are out of sync. Above you can see the diff that got generated from rebuilding them. Please review and commit the results."
puts

exit(1)
end
require "open3"

output, status = Open3.capture2e("git status --porcelain")

if status.success? && output.empty?
puts
puts "Man pages are in sync"
puts
else
sh("git status --porcelain")

puts
puts "Man pages are out of sync. Above you can see the list of files that got modified or generated from rebuilding them. Please review and commit the results."
puts

exit(1)
end
end
end
Expand Down
25 changes: 25 additions & 0 deletions bundler/man/index.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Gemfile(5) gemfile.5
bundle(1) bundle.1
bundle-add(1) bundle-add.1
bundle-binstubs(1) bundle-binstubs.1
bundle-cache(1) bundle-cache.1
bundle-check(1) bundle-check.1
bundle-clean(1) bundle-clean.1
bundle-config(1) bundle-config.1
bundle-doctor(1) bundle-doctor.1
bundle-exec(1) bundle-exec.1
bundle-gem(1) bundle-gem.1
bundle-info(1) bundle-info.1
bundle-init(1) bundle-init.1
bundle-inject(1) bundle-inject.1
bundle-install(1) bundle-install.1
bundle-list(1) bundle-list.1
bundle-lock(1) bundle-lock.1
bundle-open(1) bundle-open.1
bundle-outdated(1) bundle-outdated.1
bundle-platform(1) bundle-platform.1
bundle-pristine(1) bundle-pristine.1
bundle-remove(1) bundle-remove.1
bundle-show(1) bundle-show.1
bundle-update(1) bundle-update.1
bundle-viz(1) bundle-viz.1

0 comments on commit be3daef

Please sign in to comment.