Skip to content
This repository has been archived by the owner on Jan 10, 2021. It is now read-only.

Enable running rake target without argument all #23

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ Rake::Task[:jekyll].invoke
Rake::Task[:rename].invoke

desc "Create epub versions of our book(s)."
if "#{args.book}" == "all"
if "#{args.book}" == "all" or args.book.nil?
filelist = Rake::FileList["_site/*/*-epub*"]
fullfiles = filelist.pathmap("%n")
files = fullfiles.gsub!(/\b-epub\b/, "")
Expand All @@ -213,7 +213,7 @@ Rake::Task[:jekyll].invoke
Rake::Task[:rename].invoke

desc "Create Smashwords epub versions of our book(s)."
if "#{args.book}" == "all"
if "#{args.book}" == "all" or args.book.nil?
filelist = Rake::FileList["_site/*/*-Smashwords*"]
fullfiles = filelist.pathmap("%n")
files = fullfiles.gsub!(/\b-Smashwords\b/, "")
Expand All @@ -234,7 +234,7 @@ Rake::Task[:jekyll].invoke
Rake::Task[:rename].invoke

desc "Create Amazon mobi versions of our book(s)."
if "#{args.book}" == "all"
if "#{args.book}" == "all" or args.book.nil?
filelist = Rake::FileList["_site/*/*-Amazon*"]
fullfiles = filelist.pathmap("%n")
files = fullfiles.gsub!(/\b-Amazon\b/, "")
Expand Down Expand Up @@ -262,7 +262,7 @@ Rake::Task[:rename].invoke

system "pandoc --latex-engine=xelatex -o Books/bio.tex Source/_includes/bio.md"

if "#{args.book}" == "all"
if "#{args.book}" == "all" or args.book.nil?
filelist = Rake::FileList["_site/*/*-pdf*"]
fullfiles = filelist.pathmap("%n")
files = fullfiles.gsub!(/\b-pdf\b/, "")
Expand All @@ -285,7 +285,7 @@ Rake::Task[:rename].invoke

system "pandoc --latex-engine=xelatex -o Books/bio.tex Source/_includes/bio.md"

if "#{args.book}" == "all"
if "#{args.book}" == "all" or args.book.nil?
filelist = Rake::FileList["_site/*/*-pdf*"]
fullfiles = filelist.pathmap("%n")
files = fullfiles.gsub!(/\b-pdf\b/, "")
Expand All @@ -308,7 +308,7 @@ Rake::Task[:rename].invoke

system "pandoc --latex-engine=xelatex -o Books/bio.tex Source/_includes/bio.md"

if "#{args.book}" == "all"
if "#{args.book}" == "all" or args.book.nil?
filelist = Rake::FileList["_site/*/*-pdf*"]
fullfiles = filelist.pathmap("%n")
files = fullfiles.gsub!(/\b-pdf\b/, "")
Expand All @@ -326,7 +326,7 @@ end
task :all, [:book] do |task, args|
desc "Create all versions of our book(s)."

if "#{args.book}" == "all"
if "#{args.book}" == "all" or args.book.nil?
Rake::Task[:jekyll].invoke
Rake::Task[:rename].invoke
Rake::Task[:epub].invoke("all")
Expand Down