Skip to content

Commit 1ca3988

Browse files
pastatopfknittldependabot[bot]
authored
Pull request 1672 (#244)
* pull request 1668 * Point readers to Libera Chat IRC (#240) The #git channel on Freenode does not have an active user base anymore. Match the recommended IRC network of <https://git-scm.com/community>. See commit 68dfaeef078d4da433eee5b6d998bad0f4f78c81 of https://github.com/progit/progit2. * Update epubcheck-ruby requirement from 4.2.5.0 to 4.2.6.0 (#241) Updates the requirements on [epubcheck-ruby](https://github.com/takahashim/epubcheck-ruby) to permit the latest version. - [Release notes](https://github.com/takahashim/epubcheck-ruby/releases) - [Commits](takahashim/epubcheck-ruby@v4.2.5.0...v4.2.6.0) --- updated-dependencies: - dependency-name: epubcheck-ruby dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update asciidoctor requirement from 2.0.15 to 2.0.16 (#242) Updates the requirements on [asciidoctor](https://github.com/asciidoctor/asciidoctor) to permit the latest version. - [Release notes](https://github.com/asciidoctor/asciidoctor/releases) - [Changelog](https://github.com/asciidoctor/asciidoctor/blob/master/CHANGELOG.adoc) - [Commits](asciidoctor/asciidoctor@v2.0.15...v2.0.16) --- updated-dependencies: - dependency-name: asciidoctor dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * pull request 1672 Co-authored-by: knittl <knittl89+github@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 parent 890b94d commit 1ca3988

2 files changed

Lines changed: 11 additions & 15 deletions

File tree

Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,5 @@ gem 'pygments.rb', '2.2.0'
1414
gem 'thread_safe', '0.3.6'
1515
gem 'html-proofer', '3.19.2'
1616
gem 'epubcheck-ruby', '4.2.6.0'
17+
gem 'kindlegen', '3.1.1'
18+

Rakefile

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
11
namespace :book do
2-
def exec_or_raise(command)
3-
puts `#{command}`
4-
if (! $?.success?)
5-
raise "'#{command}' failed"
6-
end
7-
end
82

93
# Variables referenced for build
104
version_string = `git describe --tags`.chomp
@@ -28,7 +22,7 @@ namespace :book do
2822
puts "Hash on header of contributors list (#{header_hash}) matches the current HEAD (#{current_head_hash})"
2923
else
3024
puts "Hash on header of contributors list (#{header_hash}) does not match the current HEAD (#{current_head_hash}), refreshing"
31-
`rm book/contributors.txt`
25+
sh "rm book/contributors.txt"
3226
# Reenable and invoke task again
3327
Rake::Task['book/contributors.txt'].reenable
3428
Rake::Task['book/contributors.txt'].invoke
@@ -58,16 +52,16 @@ namespace :book do
5852
desc 'generate contributors list'
5953
file 'book/contributors.txt' do
6054
puts 'Generating contributors list'
61-
`echo "Contributors as of #{header_hash}:\n" > book/contributors.txt`
62-
`git shortlog -s | grep -v -E "(Straub|Chacon|dependabot)" | cut -f 2- | column -c 120 >> book/contributors.txt`
55+
sh "echo 'Contributors as of #{header_hash}:\n' > book/contributors.txt"
56+
sh "git shortlog -s | grep -v -E '(Straub|Chacon|dependabot)' | cut -f 2- | column -c 120 >> book/contributors.txt"
6357
end
6458

6559
desc 'build HTML format'
6660
task :build_html => 'book/contributors.txt' do
6761
check_contrib()
6862

6963
puts 'Converting to HTML...'
70-
`bundle exec asciidoctor #{params} -a data-uri progit.asc`
64+
sh "bundle exec asciidoctor #{params} -a data-uri progit.asc"
7165
puts ' -- HTML output at progit.html'
7266

7367
end
@@ -77,7 +71,7 @@ namespace :book do
7771
check_contrib()
7872

7973
puts 'Converting to EPub...'
80-
`bundle exec asciidoctor-epub3 #{params} progit.asc`
74+
sh "bundle exec asciidoctor-epub3 #{params} progit.asc"
8175
puts ' -- Epub output at progit.epub'
8276

8377
end
@@ -87,7 +81,7 @@ namespace :book do
8781
check_contrib()
8882

8983
puts "Converting to Mobi (kf8)..."
90-
`bundle exec asciidoctor-epub3 #{params} -a ebook-format=kf8 progit.asc`
84+
sh "bundle exec asciidoctor-epub3 #{params} -a ebook-format=kf8 progit.asc"
9185
puts " -- Mobi output at progit.mobi"
9286
end
9387

@@ -96,16 +90,16 @@ namespace :book do
9690
check_contrib()
9791

9892
puts 'Converting to PDF... (this one takes a while)'
99-
`bundle exec asciidoctor-pdf #{params} progit.asc 2>/dev/null`
93+
sh "bundle exec asciidoctor-pdf #{params} progit.asc 2>/dev/null"
10094
puts ' -- PDF output at progit.pdf'
10195
end
10296

10397
desc 'Check generated books'
10498
task :check => [:build_html, :build_epub] do
10599
puts 'Checking generated books'
106100

107-
exec_or_raise('htmlproofer --check-html progit.html')
108-
exec_or_raise('epubcheck progit.epub')
101+
sh "htmlproofer --check-html progit.html"
102+
sh "epubcheck progit.epub"
109103
end
110104

111105
desc 'Clean all generated files'

0 commit comments

Comments
 (0)