diff options
author | Bundlerbot <bot@bundler.io> | 2019-08-14 15:38:36 +0000 |
---|---|---|
committer | Bundlerbot <bot@bundler.io> | 2019-08-14 15:38:36 +0000 |
commit | 9452a005b8e62eeddd1309523faf9cf7b8698edd (patch) | |
tree | 5676daa09b4086047de3bbe31fbbbc01eea2e3e3 | |
parent | 5a7a5a5c423c997f1d86f3b0ba85301c5e1929c2 (diff) | |
parent | c2fc2081d3a134d10ec91cb7fdb07b5e1343aec3 (diff) | |
download | bundler-9452a005b8e62eeddd1309523faf9cf7b8698edd.tar.gz |
Merge #7293
7293: Fix `man:check` r=deivid-rodriguez a=deivid-rodriguez
### What was the end-user problem that led to this PR?
The problem was than `ronn` behaves weird sometimes and updates the month in pages to an old month. This can be seen in #7292, but I've seen it too myself.
### What is your fix for the problem, implemented in this PR?
My fix is to explicitly pass the current date when generating man pages. This has the disadvantage that the man pages will become out of sync if they haven't been updated for more than a month, because the month will change.
But I'd like to introduce it until I think of a better alternative.
Co-authored-by: David RodrÃguez <deivid.rodriguez@riseup.net>
-rw-r--r-- | .travis.yml | 4 | ||||
-rw-r--r-- | Rakefile | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/.travis.yml b/.travis.yml index 5256c24af4..3d2a321215 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,10 @@ language: ruby -dist: xenial +dist: bionic script: rake spec:travis before_script: - travis_retry rake -E 'module ::Bundler; VERSION = "0.0.0"; end' override_version - travis_retry rake spec:travis:deps - - travis_retry rake man:check + - rake man:check branches: only: @@ -46,7 +46,7 @@ namespace :spec do # Refresh packages index that the ones we need can be installed sh "sudo apt-get update" # Install groff so ronn can generate man/help pages - sh "sudo apt-get install groff-base -y" + sh "sudo apt-get install groff-base=1.22.3-10 -y" # Install graphviz so that the viz specs can run sh "sudo apt-get install graphviz -y" @@ -196,7 +196,7 @@ namespace :man do index << [ronn, File.basename(roff)] file roff => ["man", ronn] do - sh "bin/ronn --roff --pipe #{ronn} > #{roff}" + sh "bin/ronn --roff --pipe --date #{Time.now.strftime("%Y-%m-%d")} #{ronn} > #{roff}" end file "#{roff}.txt" => roff do @@ -233,13 +233,13 @@ namespace :man do desc "Verify man pages are in sync" task :check => :build do - sh("git diff --quiet man") do |outcome, _| + 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 man") + 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." |