summaryrefslogtreecommitdiff
path: root/Rakefile
diff options
context:
space:
mode:
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