From 00fd2149d708e13f0e3dbd3a7a1c07b54586ee0e Mon Sep 17 00:00:00 2001 From: Stefan Kreutz Date: Thu, 28 Apr 2022 15:24:06 +0200 Subject: Run checks before deployment --- script/deploy | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'script/deploy') diff --git a/script/deploy b/script/deploy index ec2a6f3..40a36a9 100755 --- a/script/deploy +++ b/script/deploy @@ -30,6 +30,9 @@ printf "Re-generating static website from source ...\\n" && cabal v2-run exe:site -- clean >/dev/null 2>&1 \ && cabal v2-run exe:site -- build >/dev/null 2>&1 ) +printf "Running checks ...\\n" +( cd "${root}" && ./script/check ) + [ -z "$( git status --porcelain )" ] || { ( >&2 printf "error: dirty working tree\\n" ) printf "Aborting deployment due to unstaged changes or untracked files.\\n" @@ -55,5 +58,5 @@ curl \ http://www.bing.com/ping?sitemap=https%3A%2F%2Fwww.skreutz.com/sitemap.xml \ || ( >&2 printf "error: failed to submit live sitemap to bing.com\\n" ) -# shellcheck source=./check -. "${root}/script/check" +# shellcheck source=./check-online +. "${root}/script/check-online" -- cgit v1.2.3