From 77c74e3084c8dda6fccd0a03c27b76e9baaeb90c Mon Sep 17 00:00:00 2001 From: Bagas Sanjaya Date: Sat, 23 Jan 2021 19:36:47 +0700 Subject: [PATCH 01/17] Move referenced build variables to book namespace This preliminary commit move build-related variables from :build task out to :book namespace. Such variables will be referenced by each generating tasks. Signed-off-by: Bagas Sanjaya --- Rakefile | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Rakefile b/Rakefile index bfd5f68be..bc8ef9202 100644 --- a/Rakefile +++ b/Rakefile @@ -6,16 +6,18 @@ namespace :book do end end + # Variables referenced for build + version_string = ENV['TRAVIS_TAG'] || `git describe --tags`.chomp + if version_string.empty? + version_string = '0' + end + date_string = Time.now.strftime("%Y-%m-%d") + params = "--attribute revnumber='#{version_string}' --attribute revdate='#{date_string}'" + desc 'build basic book formats' task :build do begin - version_string = ENV['TRAVIS_TAG'] || `git describe --tags`.chomp - if version_string.empty? - version_string = '0' - end - date_string = Time.now.strftime("%Y-%m-%d") - params = "--attribute revnumber='#{version_string}' --attribute revdate='#{date_string}'" puts "Generating contributors list" `git shortlog -s | grep -v -E "(Straub|Chacon|dependabot)" | cut -f 2- | column -c 120 > book/contributors.txt` From ad94f148d7ee2f346271c4aa18bc0b46f5d21582 Mon Sep 17 00:00:00 2001 From: Bagas Sanjaya Date: Sat, 23 Jan 2021 19:44:10 +0700 Subject: [PATCH 02/17] Split book generating tasks into each own tasks For each formats, including currently unsupported Mobi format, extract from :build task. Signed-off-by: Bagas Sanjaya --- Rakefile | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/Rakefile b/Rakefile index bc8ef9202..89847ee53 100644 --- a/Rakefile +++ b/Rakefile @@ -21,18 +21,31 @@ namespace :book do puts "Generating contributors list" `git shortlog -s | grep -v -E "(Straub|Chacon|dependabot)" | cut -f 2- | column -c 120 > book/contributors.txt` + + + end + end + + desc 'build HTML format' + task :build_html do puts "Converting to HTML..." `bundle exec asciidoctor #{params} -a data-uri progit.asc` puts " -- HTML output at progit.html" exec_or_raise('htmlproofer --check-html progit.html') + end + desc 'build Epub format' + task :build_epub do puts "Converting to EPub..." `bundle exec asciidoctor-epub3 #{params} progit.asc` puts " -- Epub output at progit.epub" exec_or_raise('epubcheck progit.epub') + end + desc 'build Mobi format' + task :build_mobi do # Commented out the .mobi file creation because the kindlegen dependency is not available. # For more information on this see: #1496. # This is a (hopefully) temporary fix until upstream asciidoctor-epub3 is fixed and we can offer .mobi files again. @@ -41,12 +54,20 @@ namespace :book do # `bundle exec asciidoctor-epub3 #{params} -a ebook-format=kf8 progit.asc` # puts " -- Mobi output at progit.mobi" + # FIXME: If asciidoctor-epub3 supports Mobi again, uncomment these + # lines below + puts "Converting to Mobi isn't supported yet." + puts "For more information see issue #1496 at https://github.com/progit/progit2/issues/1496." + exit(127) + end + + desc 'build PDF format' + task :build_pdf do puts "Converting to PDF... (this one takes a while)" `bundle exec asciidoctor-pdf #{params} progit.asc 2>/dev/null` puts " -- PDF output at progit.pdf" - - end end + end task :default => "book:build" From a3fdc199d4d4cb6eca9df9032bcc6de2e6e7f818 Mon Sep 17 00:00:00 2001 From: Bagas Sanjaya Date: Sun, 24 Jan 2021 16:37:46 +0700 Subject: [PATCH 03/17] Make generating contributors.txt a file task This file task is required to build books. Signed-off-by: Bagas Sanjaya --- Rakefile | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/Rakefile b/Rakefile index 89847ee53..6d7948b2d 100644 --- a/Rakefile +++ b/Rakefile @@ -18,16 +18,19 @@ namespace :book do task :build do begin - puts "Generating contributors list" - `git shortlog -s | grep -v -E "(Straub|Chacon|dependabot)" | cut -f 2- | column -c 120 > book/contributors.txt` - end end + desc 'generate contributors list' + file 'book/contributors.txt' do + puts "Generating contributors list" + `git shortlog -s | grep -v -E "(Straub|Chacon|dependabot)" | cut -f 2- | column -c 120 > book/contributors.txt` + end + desc 'build HTML format' - task :build_html do + task :build_html => 'book/contributors.txt' do puts "Converting to HTML..." `bundle exec asciidoctor #{params} -a data-uri progit.asc` puts " -- HTML output at progit.html" @@ -36,7 +39,7 @@ namespace :book do end desc 'build Epub format' - task :build_epub do + task :build_epub => 'book/contributors.txt' do puts "Converting to EPub..." `bundle exec asciidoctor-epub3 #{params} progit.asc` puts " -- Epub output at progit.epub" @@ -45,7 +48,7 @@ namespace :book do end desc 'build Mobi format' - task :build_mobi do + task :build_mobi => 'book/contributors.txt' do # Commented out the .mobi file creation because the kindlegen dependency is not available. # For more information on this see: #1496. # This is a (hopefully) temporary fix until upstream asciidoctor-epub3 is fixed and we can offer .mobi files again. @@ -62,7 +65,7 @@ namespace :book do end desc 'build PDF format' - task :build_pdf do + task :build_pdf => 'book/contributors.txt' do puts "Converting to PDF... (this one takes a while)" `bundle exec asciidoctor-pdf #{params} progit.asc 2>/dev/null` puts " -- PDF output at progit.pdf" From 7bb9d48c525066f7e5fa01937bf2e281f5b14900 Mon Sep 17 00:00:00 2001 From: Bagas Sanjaya Date: Sun, 24 Jan 2021 17:45:51 +0700 Subject: [PATCH 04/17] Require dependency tasks for default :build task The default task is now empty, so we can simply list its dependency tasks. Signed-off-by: Bagas Sanjaya --- Rakefile | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/Rakefile b/Rakefile index 6d7948b2d..0e8ccbbae 100644 --- a/Rakefile +++ b/Rakefile @@ -15,13 +15,7 @@ namespace :book do params = "--attribute revnumber='#{version_string}' --attribute revdate='#{date_string}'" desc 'build basic book formats' - task :build do - - begin - - - end - end + task :build => [:build_html, :build_epub, :build_pdf] desc 'generate contributors list' file 'book/contributors.txt' do From 732ae561641e8ff6b1bf8e5c0d79b20373839200 Mon Sep 17 00:00:00 2001 From: Bagas Sanjaya Date: Mon, 25 Jan 2021 17:10:30 +0700 Subject: [PATCH 05/17] Add :clean task Clean all generated artifacts (contributors list and book formats). Signed-off-by: Bagas Sanjaya --- Rakefile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Rakefile b/Rakefile index 0e8ccbbae..a756085ee 100644 --- a/Rakefile +++ b/Rakefile @@ -65,6 +65,22 @@ namespace :book do puts " -- PDF output at progit.pdf" end + desc 'Clean all generated files' + task :clean do + begin + puts "Removing generated files" + + FileList['book/contributors.txt', 'progit.html', 'progit.epub', 'progit.pdf'].each do |file| + rm file + + # Rescue if file not found + rescue Errno::ENOENT => e + puts e.message + puts "Error removing files (ignored)" + end + end + end + end task :default => "book:build" From 6e4a261f2ce19cc052755ba1c0a0681ee85b8a4b Mon Sep 17 00:00:00 2001 From: Bagas Sanjaya Date: Mon, 25 Jan 2021 19:06:04 +0700 Subject: [PATCH 06/17] Add :check task As suggested by @jnavila. Check only HTML and epub books. As before this refactor, default book:build task also check them. Signed-off-by: Bagas Sanjaya --- Rakefile | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Rakefile b/Rakefile index a756085ee..9a4194ec0 100644 --- a/Rakefile +++ b/Rakefile @@ -15,7 +15,7 @@ namespace :book do params = "--attribute revnumber='#{version_string}' --attribute revdate='#{date_string}'" desc 'build basic book formats' - task :build => [:build_html, :build_epub, :build_pdf] + task :build => [:build_html, :build_epub, :build_pdf, :check] desc 'generate contributors list' file 'book/contributors.txt' do @@ -29,7 +29,6 @@ namespace :book do `bundle exec asciidoctor #{params} -a data-uri progit.asc` puts " -- HTML output at progit.html" - exec_or_raise('htmlproofer --check-html progit.html') end desc 'build Epub format' @@ -38,7 +37,6 @@ namespace :book do `bundle exec asciidoctor-epub3 #{params} progit.asc` puts " -- Epub output at progit.epub" - exec_or_raise('epubcheck progit.epub') end desc 'build Mobi format' @@ -65,6 +63,16 @@ namespace :book do puts " -- PDF output at progit.pdf" end + desc 'Check generated books' + task :check => [:build_html, :build_epub] do + begin + puts "Checking generated books" + + exec_or_raise('htmlproofer --check-html progit.html') + exec_or_raise('epubcheck progit.epub') + end + end + desc 'Clean all generated files' task :clean do begin From 1374429aa3c493439bb021135f7fb0f21acf09b2 Mon Sep 17 00:00:00 2001 From: Bagas Sanjaya Date: Tue, 26 Jan 2021 17:51:59 +0700 Subject: [PATCH 07/17] Invoke :check task inside :build Instead of invoking :check as dependency, explicitly invoke it inside the body of :build. As suggested by @jnavila, any errors raised from :check should not cause FTBFS, thus ignore them. Signed-off-by: Bagas Sanjaya --- Rakefile | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index 9a4194ec0..6ad22c178 100644 --- a/Rakefile +++ b/Rakefile @@ -15,7 +15,17 @@ namespace :book do params = "--attribute revnumber='#{version_string}' --attribute revdate='#{date_string}'" desc 'build basic book formats' - task :build => [:build_html, :build_epub, :build_pdf, :check] + task :build => [:build_html, :build_epub, :build_pdf] do + begin + # Run check + Rake::Task["book:check"].invoke + + # Rescue to ignore checking errors + rescue => e + puts e.message + puts "Error when checking books (ignored)" + end + end desc 'generate contributors list' file 'book/contributors.txt' do From c15bddd7b5bb19260de16fea7f221e89ae250371 Mon Sep 17 00:00:00 2001 From: Bagas Sanjaya Date: Wed, 27 Jan 2021 15:24:05 +0700 Subject: [PATCH 08/17] Add :ci task As suggested by @jnavila. Similar to :build, but don't ignore any errors. Signed-off-by: Bagas Sanjaya --- Rakefile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Rakefile b/Rakefile index 6ad22c178..e556a7fef 100644 --- a/Rakefile +++ b/Rakefile @@ -27,6 +27,14 @@ namespace :book do end end + desc 'build basic book formats (for ci)' + task :ci => [:build_html, :build_epub, :build_pdf] do + begin + # Run check, but don't ignore any errors + Rake::Task["book:check"].invoke + end + end + desc 'generate contributors list' file 'book/contributors.txt' do puts "Generating contributors list" From 41b342017edb68f66b0f98b175b3e407dd9cadd5 Mon Sep 17 00:00:00 2001 From: Bagas Sanjaya Date: Mon, 25 Jan 2021 19:38:47 +0700 Subject: [PATCH 09/17] Update README for generating single book format Signed-off-by: Bagas Sanjaya --- README.asc | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/README.asc b/README.asc index 98b568465..4eeda7cfc 100644 --- a/README.asc +++ b/README.asc @@ -29,6 +29,26 @@ Converting to PDF... -- PDF output at progit.pdf ---- +If you only want to generate only one of supported formats (HTML, Epub, or PDF), do one of the following: + +To generate HTML book: + +---- +$ bundle exec rake book:build_html +---- + +To generate Epub book: + +---- +$ bundle exec rake book:build_epub +---- + +To generate PDF book: + +---- +$ bundle exec rake book:build_pdf +---- + == Signaling an Issue Before signaling an issue, please check that there isn't already a similar one in the bug tracking system. From fa62984519b0866dfb9cc173fdda82fa22f5efb8 Mon Sep 17 00:00:00 2001 From: Bagas Sanjaya Date: Fri, 29 Jan 2021 15:06:40 +0700 Subject: [PATCH 10/17] Apply suggestions from code review Apply suggestions from @HonkingGoose: - README rewording - FIXME line fitting on Rakefile Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com> --- README.asc | 9 +++++---- Rakefile | 3 +-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.asc b/README.asc index 4eeda7cfc..53ed6f75f 100644 --- a/README.asc +++ b/README.asc @@ -29,21 +29,22 @@ Converting to PDF... -- PDF output at progit.pdf ---- -If you only want to generate only one of supported formats (HTML, Epub, or PDF), do one of the following: +You can generate just one of the supported formats (HTML, EPUB, or PDF). +Use one of the following commands: -To generate HTML book: +To generate the HTML book: ---- $ bundle exec rake book:build_html ---- -To generate Epub book: +To generate the EPUB book: ---- $ bundle exec rake book:build_epub ---- -To generate PDF book: +To generate the PDF book: ---- $ bundle exec rake book:build_pdf diff --git a/Rakefile b/Rakefile index e556a7fef..dc7e26a6a 100644 --- a/Rakefile +++ b/Rakefile @@ -67,8 +67,7 @@ namespace :book do # `bundle exec asciidoctor-epub3 #{params} -a ebook-format=kf8 progit.asc` # puts " -- Mobi output at progit.mobi" - # FIXME: If asciidoctor-epub3 supports Mobi again, uncomment these - # lines below + # FIXME: If asciidoctor-epub3 supports Mobi again, uncomment these lines below puts "Converting to Mobi isn't supported yet." puts "For more information see issue #1496 at https://github.com/progit/progit2/issues/1496." exit(127) From 15579fe8042e1eb818479d497aaf6eaae4f34266 Mon Sep 17 00:00:00 2001 From: Bagas Sanjaya Date: Sun, 7 Feb 2021 14:59:31 +0700 Subject: [PATCH 11/17] Wrap rescue inside :clean inside begin/end block As per code review, @jnavila reported an error that requires begin/end block for multiline rescue body. Signed-off-by: Bagas Sanjaya --- Rakefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Rakefile b/Rakefile index e556a7fef..490171d19 100644 --- a/Rakefile +++ b/Rakefile @@ -101,8 +101,10 @@ namespace :book do # Rescue if file not found rescue Errno::ENOENT => e - puts e.message - puts "Error removing files (ignored)" + begin + puts e.message + puts "Error removing files (ignored)" + end end end end From 8339e2095bbe327dfbc0686143ff66f0166d6c3d Mon Sep 17 00:00:00 2001 From: Bagas Sanjaya Date: Sun, 7 Feb 2021 15:12:09 +0700 Subject: [PATCH 12/17] Remove useless begin/end block As per code review by @jnavila Signed-off-by: Bagas Sanjaya --- Rakefile | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/Rakefile b/Rakefile index 490171d19..39fd8d166 100644 --- a/Rakefile +++ b/Rakefile @@ -29,10 +29,8 @@ namespace :book do desc 'build basic book formats (for ci)' task :ci => [:build_html, :build_epub, :build_pdf] do - begin - # Run check, but don't ignore any errors - Rake::Task["book:check"].invoke - end + # Run check, but don't ignore any errors + Rake::Task["book:check"].invoke end desc 'generate contributors list' @@ -83,12 +81,10 @@ namespace :book do desc 'Check generated books' task :check => [:build_html, :build_epub] do - begin - puts "Checking generated books" + puts "Checking generated books" - exec_or_raise('htmlproofer --check-html progit.html') - exec_or_raise('epubcheck progit.epub') - end + exec_or_raise('htmlproofer --check-html progit.html') + exec_or_raise('epubcheck progit.epub') end desc 'Clean all generated files' From 238458041ff9c547ce88e967379f2c03a4c32ddb Mon Sep 17 00:00:00 2001 From: Bagas Sanjaya Date: Sun, 7 Feb 2021 15:39:26 +0700 Subject: [PATCH 13/17] Use single quotes for non-interpolated strings As requested by @jnavila in code review. Signed-off-by: Bagas Sanjaya --- Rakefile | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/Rakefile b/Rakefile index 39fd8d166..333c048b6 100644 --- a/Rakefile +++ b/Rakefile @@ -11,7 +11,7 @@ namespace :book do if version_string.empty? version_string = '0' end - date_string = Time.now.strftime("%Y-%m-%d") + date_string = Time.now.strftime('%Y-%m-%d') params = "--attribute revnumber='#{version_string}' --attribute revdate='#{date_string}'" desc 'build basic book formats' @@ -23,7 +23,7 @@ namespace :book do # Rescue to ignore checking errors rescue => e puts e.message - puts "Error when checking books (ignored)" + puts 'Error when checking books (ignored)' end end @@ -35,23 +35,23 @@ namespace :book do desc 'generate contributors list' file 'book/contributors.txt' do - puts "Generating contributors list" + puts 'Generating contributors list' `git shortlog -s | grep -v -E "(Straub|Chacon|dependabot)" | cut -f 2- | column -c 120 > book/contributors.txt` end desc 'build HTML format' task :build_html => 'book/contributors.txt' do - puts "Converting to HTML..." + puts 'Converting to HTML...' `bundle exec asciidoctor #{params} -a data-uri progit.asc` - puts " -- HTML output at progit.html" + puts ' -- HTML output at progit.html' end desc 'build Epub format' task :build_epub => 'book/contributors.txt' do - puts "Converting to EPub..." + puts 'Converting to EPub...' `bundle exec asciidoctor-epub3 #{params} progit.asc` - puts " -- Epub output at progit.epub" + puts ' -- Epub output at progit.epub' end @@ -67,21 +67,21 @@ namespace :book do # FIXME: If asciidoctor-epub3 supports Mobi again, uncomment these # lines below - puts "Converting to Mobi isn't supported yet." - puts "For more information see issue #1496 at https://github.com/progit/progit2/issues/1496." + puts 'Converting to Mobi is not supported yet.' + puts 'For more information see issue #1496 at https://github.com/progit/progit2/issues/1496.' exit(127) end desc 'build PDF format' task :build_pdf => 'book/contributors.txt' do - puts "Converting to PDF... (this one takes a while)" + puts 'Converting to PDF... (this one takes a while)' `bundle exec asciidoctor-pdf #{params} progit.asc 2>/dev/null` - puts " -- PDF output at progit.pdf" + puts ' -- PDF output at progit.pdf' end desc 'Check generated books' task :check => [:build_html, :build_epub] do - puts "Checking generated books" + puts 'Checking generated books' exec_or_raise('htmlproofer --check-html progit.html') exec_or_raise('epubcheck progit.epub') @@ -90,7 +90,7 @@ namespace :book do desc 'Clean all generated files' task :clean do begin - puts "Removing generated files" + puts 'Removing generated files' FileList['book/contributors.txt', 'progit.html', 'progit.epub', 'progit.pdf'].each do |file| rm file @@ -99,7 +99,7 @@ namespace :book do rescue Errno::ENOENT => e begin puts e.message - puts "Error removing files (ignored)" + puts 'Error removing files (ignored)' end end end From ae9f953033cea45b9a2c9c424659769399a26770 Mon Sep 17 00:00:00 2001 From: Bagas Sanjaya Date: Wed, 10 Feb 2021 14:45:18 +0700 Subject: [PATCH 14/17] Prepend header containing commit hash to generated contributors list In order to check contributors list by commit hash, the hash have to be added to the list. Signed-off-by: Bagas Sanjaya --- Rakefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index 333c048b6..ff4a3d119 100644 --- a/Rakefile +++ b/Rakefile @@ -13,6 +13,7 @@ namespace :book do end date_string = Time.now.strftime('%Y-%m-%d') params = "--attribute revnumber='#{version_string}' --attribute revdate='#{date_string}'" + header_hash = `git rev-parse --short HEAD`.strip desc 'build basic book formats' task :build => [:build_html, :build_epub, :build_pdf] do @@ -36,7 +37,8 @@ namespace :book do desc 'generate contributors list' file 'book/contributors.txt' do puts 'Generating contributors list' - `git shortlog -s | grep -v -E "(Straub|Chacon|dependabot)" | cut -f 2- | column -c 120 > book/contributors.txt` + `echo "Contributors as of #{header_hash}:\n" > book/contributors.txt` + `git shortlog -s | grep -v -E "(Straub|Chacon|dependabot)" | cut -f 2- | column -c 120 >> book/contributors.txt` end desc 'build HTML format' From 920b942b9066d8bef40b3e66b7531d0b63a95f3e Mon Sep 17 00:00:00 2001 From: Bagas Sanjaya Date: Wed, 10 Feb 2021 14:49:34 +0700 Subject: [PATCH 15/17] Check contributors list by comparing current HEAD against stored commit hash As requested by @jnavila in code review. Compare current HEAD commit hash against the hash stored in the header of contributors list. If these match, go on. If not, refresh (rm and generate contributors list again). Signed-off-by: Bagas Sanjaya --- Rakefile | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/Rakefile b/Rakefile index ff4a3d119..c0ee32698 100644 --- a/Rakefile +++ b/Rakefile @@ -15,6 +15,27 @@ namespace :book do params = "--attribute revnumber='#{version_string}' --attribute revdate='#{date_string}'" header_hash = `git rev-parse --short HEAD`.strip + # Check contributors list + # This checks commit hash stored in the header of list against current HEAD + def check_contrib + if File.exist?('book/contributors.txt') + current_head_hash = `git rev-parse --short HEAD`.strip + header = `head -n 1 book/contributors.txt`.strip + # Match regex, then coerce resulting array to string by join + header_hash = header.scan(/[a-f0-9]{7,}/).join + + if header_hash == current_head_hash + puts "Hash on header of contributors list (#{header_hash}) matches the current HEAD (#{current_head_hash})" + else + puts "Hash on header of contributors list (#{header_hash}) does not match the current HEAD (#{current_head_hash}), refreshing" + `rm book/contributors.txt` + # Reenable and invoke task again + Rake::Task["book/contributors.txt"].reenable + Rake::Task["book/contributors.txt"].invoke + end + end + end + desc 'build basic book formats' task :build => [:build_html, :build_epub, :build_pdf] do begin @@ -43,6 +64,8 @@ namespace :book do desc 'build HTML format' task :build_html => 'book/contributors.txt' do + check_contrib() + puts 'Converting to HTML...' `bundle exec asciidoctor #{params} -a data-uri progit.asc` puts ' -- HTML output at progit.html' @@ -51,6 +74,8 @@ namespace :book do desc 'build Epub format' task :build_epub => 'book/contributors.txt' do + check_contrib() + puts 'Converting to EPub...' `bundle exec asciidoctor-epub3 #{params} progit.asc` puts ' -- Epub output at progit.epub' @@ -76,6 +101,8 @@ namespace :book do desc 'build PDF format' task :build_pdf => 'book/contributors.txt' do + check_contrib() + puts 'Converting to PDF... (this one takes a while)' `bundle exec asciidoctor-pdf #{params} progit.asc 2>/dev/null` puts ' -- PDF output at progit.pdf' From d39b86ef7222ff1f52cec1ff487a67229ddf2787 Mon Sep 17 00:00:00 2001 From: Bagas Sanjaya Date: Wed, 10 Feb 2021 15:02:07 +0700 Subject: [PATCH 16/17] Use single quotes for invoking tasks As to be consistent with other non-interpolated strings. Signed-off-by: Bagas Sanjaya --- Rakefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Rakefile b/Rakefile index c0ee32698..00d8158e3 100644 --- a/Rakefile +++ b/Rakefile @@ -30,8 +30,8 @@ namespace :book do puts "Hash on header of contributors list (#{header_hash}) does not match the current HEAD (#{current_head_hash}), refreshing" `rm book/contributors.txt` # Reenable and invoke task again - Rake::Task["book/contributors.txt"].reenable - Rake::Task["book/contributors.txt"].invoke + Rake::Task['book/contributors.txt'].reenable + Rake::Task['book/contributors.txt'].invoke end end end @@ -40,7 +40,7 @@ namespace :book do task :build => [:build_html, :build_epub, :build_pdf] do begin # Run check - Rake::Task["book:check"].invoke + Rake::Task['book:check'].invoke # Rescue to ignore checking errors rescue => e @@ -52,7 +52,7 @@ namespace :book do desc 'build basic book formats (for ci)' task :ci => [:build_html, :build_epub, :build_pdf] do # Run check, but don't ignore any errors - Rake::Task["book:check"].invoke + Rake::Task['book:check'].invoke end desc 'generate contributors list' From e65a45ce069e60c7d09a8696ba32b6cc03753711 Mon Sep 17 00:00:00 2001 From: Bagas Sanjaya Date: Thu, 11 Feb 2021 14:06:27 +0700 Subject: [PATCH 17/17] Delete remaining conflict resolution marker line That line cause FTBFS on CI. It was forgotten to be deleted on previous commit, due to hurry. Signed-off-by: Bagas Sanjaya --- Rakefile | 1 - 1 file changed, 1 deletion(-) diff --git a/Rakefile b/Rakefile index c86bef89b..3be04e0be 100644 --- a/Rakefile +++ b/Rakefile @@ -95,7 +95,6 @@ namespace :book do # FIXME: If asciidoctor-epub3 supports Mobi again, uncomment these lines below puts "Converting to Mobi isn't supported yet." puts "For more information see issue #1496 at https://github.com/progit/progit2/issues/1496." ->>>>>>> fork/build-task-refactor exit(127) end