mirror of
https://github.com/standardebooks/web.git
synced 2025-07-07 07:10:29 -04:00
Add --no-feeds argument to deploy script
This commit is contained in:
parent
f6df03cfca
commit
ae79fc1f36
1 changed files with 29 additions and 27 deletions
|
@ -6,13 +6,13 @@ 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] [--no-build] [--no-epubcheck] [--no-recompose] [-l,--last-push-hash HASH] DIRECTORY [DIRECTORY...]
|
||||
deploy-ebook-to-www [-v,--verbose] [-g,--group GROUP] [--webroot WEBROOT] [--weburl WEBURL] [--no-images] [--no-build] [--no-epubcheck] [--no-recompose] [--no-feeds] [-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".
|
||||
|
||||
The deploy process does three things:
|
||||
The deploy process does four things:
|
||||
|
||||
1. Build distributable ebook files using 'se build'.
|
||||
|
||||
|
@ -20,6 +20,8 @@ USAGE
|
|||
|
||||
3. Generate various images and thumbnails for web use.
|
||||
|
||||
4. Generates RSS/Atom/OPDS feeds.
|
||||
|
||||
With --no-images, do not create cover thumbnails or hero images for the web.
|
||||
|
||||
With --no-build, do not run 'se build' or 'se recompose' to create distributable ebook files or web-readable versions.
|
||||
|
@ -30,6 +32,8 @@ USAGE
|
|||
|
||||
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-feeds, don't generate RSS/Atom/OPDS feeds.
|
||||
|
||||
EOF
|
||||
exit
|
||||
}
|
||||
|
@ -46,6 +50,7 @@ webUrl="https://standardebooks.org"
|
|||
lastPushHash=""
|
||||
epubcheck="true"
|
||||
recompose="true"
|
||||
feeds="true"
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
usage
|
||||
|
@ -95,6 +100,10 @@ while [ $# -gt 0 ]; do
|
|||
build="false"
|
||||
shift 1
|
||||
;;
|
||||
--no-feeds)
|
||||
feeds="false"
|
||||
shift 1
|
||||
;;
|
||||
*) break ;;
|
||||
esac
|
||||
done
|
||||
|
@ -373,29 +382,22 @@ do
|
|||
popd > /dev/null || die "Couldn't pop directory."
|
||||
done
|
||||
|
||||
# Build the OPDS catalog
|
||||
if [ "${verbose}" = "true" ]; then
|
||||
printf "Rebuilding OPDS catalog ... "
|
||||
fi
|
||||
|
||||
"${scriptsDir}/generate-feeds" --webroot "${webRoot}" --weburl "${webUrl}"
|
||||
|
||||
sudo chown --recursive se:committers "${webRoot}/www/opds/"*
|
||||
sudo chmod --recursive 664 "${webRoot}/www/opds/"*.xml
|
||||
sudo chmod --recursive 664 "${webRoot}/www/opds/"*/*.xml
|
||||
sudo chown --recursive se:committers "${webRoot}/www/rss/"*
|
||||
sudo chmod --recursive 664 "${webRoot}/www/rss/"*.xml
|
||||
sudo chmod 775 "${webRoot}/www/opds/subjects"
|
||||
|
||||
if [ "${verbose}" = "true" ]; then
|
||||
printf "Done.\n"
|
||||
fi
|
||||
|
||||
# Build the new releases RSS feed
|
||||
if [ "${verbose}" = "true" ]; then
|
||||
printf "Rebuilding new releases RSS feed ... "
|
||||
fi
|
||||
|
||||
if [ "${verbose}" = "true" ]; then
|
||||
printf "Done.\n"
|
||||
if [ "${feeds}" = "true" ]; then
|
||||
# Build the various feeds catalog
|
||||
if [ "${verbose}" = "true" ]; then
|
||||
printf "Building feeds ... "
|
||||
fi
|
||||
|
||||
"${scriptsDir}/generate-feeds" --webroot "${webRoot}" --weburl "${webUrl}"
|
||||
|
||||
sudo chown --recursive se:committers "${webRoot}/www/opds/"*
|
||||
sudo chmod --recursive 664 "${webRoot}/www/opds/"*.xml
|
||||
sudo chmod --recursive 664 "${webRoot}/www/opds/"*/*.xml
|
||||
sudo chown --recursive se:committers "${webRoot}/www/rss/"*
|
||||
sudo chmod --recursive 664 "${webRoot}/www/rss/"*.xml
|
||||
sudo chmod 775 "${webRoot}/www/opds/subjects"
|
||||
|
||||
if [ "${verbose}" = "true" ]; then
|
||||
printf "Done.\n"
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue