summaryrefslogtreecommitdiff
path: root/Rakefile
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-07-10 17:26:55 +0200
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-08-10 12:05:10 +0200
commit23de1d0177646ab73bd9ed193e29335c3a64dd5c (patch)
treecc4303301dc728d71e48183f42dac9be1cc67b41 /Rakefile
parent27b95a172c9200e77034bb113fe1633d2150552f (diff)
downloadbundler-23de1d0177646ab73bd9ed193e29335c3a64dd5c.tar.gz
Commit man pages to source control
This has the benefit that: * Allows the installation of bundler as a default gem from rubygems to include man pages. * Removes the need to build man pages during our tests. * Makes working with the manifest easier, because we only have source controlled files, and not a mix of source control and generated files. To make sure they never fall out of sync, we replace the previous `man:build` CI task with a `man:check` task that makes sure the generated man pages are up to date.
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile19
1 files changed, 19 insertions, 0 deletions
diff --git a/Rakefile b/Rakefile
index 2bba28304f..b301023cf3 100644
--- a/Rakefile
+++ b/Rakefile
@@ -230,6 +230,25 @@ namespace :man do
desc "Build the man pages"
task :build => ["man:clean", "man:build_all_pages"]
+
+ desc "Verify man pages are in sync"
+ task :check => :build do
+ sh("git diff --quiet man") do |outcome, _|
+ if outcome
+ puts
+ puts "Manpages are in sync!"
+ puts
+ else
+ sh("GIT_PAGER=cat git diff 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
+ end
+ end
end
end
end