Commit ffdd8daff4715410cb83a5d5184b94b3111586ed
Exit when refusing to publish
If we're publishing as a git pre-push hook, this cancels the push.Grey Nicholson committed on 10/1/2021, 2:21:21 PM
Parent: c00fc772f1fb429ae01504f954f70476538c8dfd
Files changed
Makefile | changed |
Makefile | |||
---|---|---|---|
@@ -20,16 +20,21 @@ | |||
20 | 20 … | ||
21 | 21 … | .cache/publish: output | |
22 | 22 … | ifeq "${SSHUSER}" "" | |
23 | 23 … | @echo "SSHUSER is undefined" | |
24 … | + exit 1 | ||
24 | 25 … | else ifeq "${SSHPASS}" "" | |
25 | 26 … | @echo "SSHPASS is undefined" | |
27 … | + exit 1 | ||
26 | 28 … | else ifeq "${SSHDIR}" "" | |
27 | 29 … | @echo "SSHDIR is undefined" | |
30 … | + exit 1 | ||
28 | 31 … | else ifeq "${SSHPORT}" "" | |
29 | 32 … | @echo "SSHPORT is undefined" | |
33 … | + exit 1 | ||
30 | 34 … | else ifneq "$$(git status --porcelain)" "" | |
31 | 35 … | @echo "Uncommitted changes" | |
36 … | + exit 1 | ||
32 | 37 … | else | |
33 | 38 … | echo -e "cd ${SSHDIR} \n put -r output/* \n exit" | \ | |
34 | 39 … | sshpass -e sftp -oBatchMode=no -b - sftp://${SSHUSER}@gkn.me.uk:${SSHPORT} | |
35 | 40 … | touch $@ | |
@@ -40,5 +45,4 @@ | |||
40 | 45 … | toolbox run npx prettier -w static/style/tarazed.css | |
41 | 46 … | ||
42 | 47 … | serve: output | |
43 | 48 … | cd output && python -m http.server | |
44 | - |
Built with git-ssb-web