mirror of
https://github.com/CPunch/openpunk-ansible.git
synced 2025-11-08 00:20:05 +00:00
roles/blog: run updateBlog; now idempotent!
This commit is contained in:
@@ -15,16 +15,14 @@ LOCAL=$(git rev-parse @)
|
||||
REMOTE=$(git rev-parse "$UPSTREAM")
|
||||
BASE=$(git merge-base @ "$UPSTREAM")
|
||||
if [ $LOCAL = $REMOTE ]; then
|
||||
echo "blog is up to date!"
|
||||
echo "up to date"
|
||||
elif [ $LOCAL = $BASE ]; then
|
||||
# there are changes to reset too
|
||||
# && we need to update our blog
|
||||
echo "missing changes!!"
|
||||
git reset --hard origin/main
|
||||
buildBlog
|
||||
fi
|
||||
|
||||
if [ ! -d "$PUBLIC_DIR" ] || [ ! -d "$TOR_DIR" ]; then
|
||||
elif [ ! -d "$PUBLIC_DIR" ] || [ ! -d "$TOR_DIR" ]; then
|
||||
echo "missing directories..."
|
||||
buildBlog
|
||||
fi
|
||||
Reference in New Issue
Block a user