mirror of
https://github.com/standardebooks/web.git
synced 2025-07-10 00:30:28 -04:00
Add --no-epubcheck option to deploy-ebook-to-www script
This commit is contained in:
parent
d81db6c229
commit
dd43efd450
1 changed files with 18 additions and 4 deletions
|
@ -6,12 +6,14 @@ DESCRIPTION
|
|||
Deploy a Standard Ebook source repository to the web.
|
||||
|
||||
USAGE
|
||||
deploy-ebook-to-www [-v,--verbose] [-g,--group GROUP] [--webroot WEBROOT] [--weburl WEBURL] [--no-images] [-l,--last-push-hash HASH] DIRECTORY [DIRECTORY...]
|
||||
deploy-ebook-to-www [-v,--verbose] [-g,--group GROUP] [--webroot WEBROOT] [--weburl WEBURL] [--no-images] [--no-epubcheck] [-l,--last-push-hash HASH] DIRECTORY [DIRECTORY...]
|
||||
DIRECTORY is a bare source repository.
|
||||
GROUP is a groupname. Defaults to "se".
|
||||
WEBROOT is the path to your webroot. Defaults to "/standardebooks.org".
|
||||
WEBURL is the URL the website is served on. Defaults to "https://standardebooks.org".
|
||||
|
||||
With --no-epubcheck, run 'build' instead of 'build --check'.
|
||||
|
||||
With --last-push-hash, check the repo head against HASH to see if the cover image or ebook source changed, which will determine if cover thumbnails get re-generated or the ebook gets re-built.
|
||||
|
||||
With --no-images, do not create cover thumbnails or hero images for the web.
|
||||
|
@ -29,6 +31,7 @@ group="se"
|
|||
webRoot="/standardebooks.org/web"
|
||||
webUrl="https://standardebooks.org"
|
||||
lastPushHash=""
|
||||
epubcheck="true"
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
usage
|
||||
|
@ -66,6 +69,10 @@ while [ $# -gt 0 ]; do
|
|||
images="false"
|
||||
shift 1
|
||||
;;
|
||||
--no-epubcheck)
|
||||
epubcheck="false"
|
||||
shift 1
|
||||
;;
|
||||
*) break ;;
|
||||
esac
|
||||
done
|
||||
|
@ -221,9 +228,16 @@ do
|
|||
mkdir "${workDir}/dist"
|
||||
|
||||
# Build the ebook
|
||||
if ! se build --output-dir="${workDir}/dist" --check --kindle --kobo --covers "${workDir}"; then
|
||||
rm --preserve-root --recursive --force "${workDir}"
|
||||
die "Error building ebook, stopping deployment."
|
||||
if [ "${epubcheck}" = "true" ]; then
|
||||
if ! se build --output-dir="${workDir}/dist" --check --kindle --kobo --covers "${workDir}"; then
|
||||
rm --preserve-root --recursive --force "${workDir}"
|
||||
die "Error building ebook, stopping deployment."
|
||||
fi
|
||||
else
|
||||
if ! se build --output-dir="${workDir}/dist" --kindle --kobo --covers "${workDir}"; then
|
||||
rm --preserve-root --recursive --force "${workDir}"
|
||||
die "Error building ebook, stopping deployment."
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "${verbose}" = "true" ]; then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue