diff --git a/Makefile b/Makefile index e3a4165..d75001c 100644 --- a/Makefile +++ b/Makefile @@ -6,6 +6,7 @@ clean: rm -rf public resources serve: + @./check_hugo.sh hugo server \ --buildDrafts \ --buildFuture \ @@ -15,10 +16,12 @@ docker-serve: docker run --rm -it -v $(CURDIR):/src -p 1313:1313 $(DOCKER_IMG) $(SERVE_CMD) production-build: clean + @./check_hugo.sh hugo \ --minify preview-build: clean + @./check_hugo.sh hugo \ --baseURL $(DEPLOY_PRIME_URL) \ --buildDrafts \ diff --git a/check_hugo.sh b/check_hugo.sh new file mode 100755 index 0000000..0391326 --- /dev/null +++ b/check_hugo.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +set -e + +command -v hugo >/dev/null || (echo "Hugo extended must be installed on your system." >/dev/stderr; exit 1) +hugo version | grep -i extended >/dev/null || (echo "Your Hugo installation does not appear to be extended." >/dev/stderr; exit 1)