mirror of
https://github.com/standardebooks/web.git
synced 2025-07-12 01:22:23 -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.
|
Deploy a Standard Ebook source repository to the web.
|
||||||
|
|
||||||
USAGE
|
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.
|
DIRECTORY is a bare source repository.
|
||||||
GROUP is a groupname. Defaults to "se".
|
GROUP is a groupname. Defaults to "se".
|
||||||
WEBROOT is the path to your webroot. Defaults to "/standardebooks.org".
|
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".
|
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 --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.
|
With --no-images, do not create cover thumbnails or hero images for the web.
|
||||||
|
@ -29,6 +31,7 @@ group="se"
|
||||||
webRoot="/standardebooks.org/web"
|
webRoot="/standardebooks.org/web"
|
||||||
webUrl="https://standardebooks.org"
|
webUrl="https://standardebooks.org"
|
||||||
lastPushHash=""
|
lastPushHash=""
|
||||||
|
epubcheck="true"
|
||||||
|
|
||||||
if [ $# -eq 0 ]; then
|
if [ $# -eq 0 ]; then
|
||||||
usage
|
usage
|
||||||
|
@ -66,6 +69,10 @@ while [ $# -gt 0 ]; do
|
||||||
images="false"
|
images="false"
|
||||||
shift 1
|
shift 1
|
||||||
;;
|
;;
|
||||||
|
--no-epubcheck)
|
||||||
|
epubcheck="false"
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
*) break ;;
|
*) break ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
@ -221,10 +228,17 @@ do
|
||||||
mkdir "${workDir}/dist"
|
mkdir "${workDir}/dist"
|
||||||
|
|
||||||
# Build the ebook
|
# Build the ebook
|
||||||
|
if [ "${epubcheck}" = "true" ]; then
|
||||||
if ! se build --output-dir="${workDir}/dist" --check --kindle --kobo --covers "${workDir}"; then
|
if ! se build --output-dir="${workDir}/dist" --check --kindle --kobo --covers "${workDir}"; then
|
||||||
rm --preserve-root --recursive --force "${workDir}"
|
rm --preserve-root --recursive --force "${workDir}"
|
||||||
die "Error building ebook, stopping deployment."
|
die "Error building ebook, stopping deployment."
|
||||||
fi
|
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
|
if [ "${verbose}" = "true" ]; then
|
||||||
printf "Done.\n"
|
printf "Done.\n"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue