From 1747125b67e3cdc93b7ec87a4c316cd4d9189274 Mon Sep 17 00:00:00 2001 From: CPunch Date: Tue, 17 Jan 2023 17:52:47 -0600 Subject: [PATCH] roles/blog: fix updateBlog --- roles/blog/templates/updateBlog | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/roles/blog/templates/updateBlog b/roles/blog/templates/updateBlog index 9573b4f..35e59f2 100644 --- a/roles/blog/templates/updateBlog +++ b/roles/blog/templates/updateBlog @@ -15,14 +15,18 @@ LOCAL=$(git rev-parse @) REMOTE=$(git rev-parse "$UPSTREAM") BASE=$(git merge-base @ "$UPSTREAM") if [ $LOCAL = $REMOTE ]; then + # this string is hardcoded && checked by the 'Build blog' task + # to check for changes (changed_when) echo "up to date" elif [ $LOCAL = $BASE ]; then - # there are changes to reset too - # && we need to update our blog - echo "missing changes!!" + # there are changes to reset too so we need to rebuild + echo "missing changes !!" git reset --hard origin/main buildBlog -elif [ ! -d "$PUBLIC_DIR" ] || [ ! -d "$TOR_DIR" ]; then - echo "missing directories..." +fi + +if [ ! -d "$PUBLIC_DIR" ] || [ ! -d "$TOR_DIR" ]; then + # probably first time setup + echo "missing directories !!" buildBlog fi \ No newline at end of file