From e8ca33f53da1814bb294e580d6343d7f7c5c25ce Mon Sep 17 00:00:00 2001 From: RunasSudo Date: Thu, 25 Feb 2021 00:45:58 +1100 Subject: [PATCH] Build process: Prevent uploading with unstaged changes --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 0f19933..5e9f6f1 100644 --- a/Makefile +++ b/Makefile @@ -38,6 +38,7 @@ mobi: ./po_ebook_convert.py _build/epub/PointsofOrder.epub _build/epub/PointsofOrder.mobi --mobi-file-type=both --remove-first-image --cover=_static/cover.jpg --chapter=/ --change-justification=left --mobi-ignore-margins --no-inline-toc upload: + git update-index --refresh > /dev/null; if git diff-index --quiet HEAD -- ; then true; else echo Cannot deploy with unstaged changes; exit 1; fi cp -r _build/html/* '/home/runassudo/Documents/Work/School Cloud Data/unenc/public/www/pointsoforder' sha256sum _build/latex/PointsOfOrder_Lulu.pdf | awk '{print substr($$1,0,6);}' > _build/latex/PointsOfOrder_Lulu.pdf.sha256 rm '/home/runassudo/Documents/Work/School Cloud Data/unenc_transient/Lulu/PointsOfOrder_Lulu'*.pdf || true