mirror of
https://github.com/CPunch/openpunk-ansible.git
synced 2024-11-22 07:20:05 +00:00
roles/blog: fix updateBlog
This commit is contained in:
parent
41ef83bb4e
commit
1747125b67
@ -15,14 +15,18 @@ LOCAL=$(git rev-parse @)
|
|||||||
REMOTE=$(git rev-parse "$UPSTREAM")
|
REMOTE=$(git rev-parse "$UPSTREAM")
|
||||||
BASE=$(git merge-base @ "$UPSTREAM")
|
BASE=$(git merge-base @ "$UPSTREAM")
|
||||||
if [ $LOCAL = $REMOTE ]; then
|
if [ $LOCAL = $REMOTE ]; then
|
||||||
|
# this string is hardcoded && checked by the 'Build blog' task
|
||||||
|
# to check for changes (changed_when)
|
||||||
echo "up to date"
|
echo "up to date"
|
||||||
elif [ $LOCAL = $BASE ]; then
|
elif [ $LOCAL = $BASE ]; then
|
||||||
# there are changes to reset too
|
# there are changes to reset too so we need to rebuild
|
||||||
# && we need to update our blog
|
|
||||||
echo "missing changes !!"
|
echo "missing changes !!"
|
||||||
git reset --hard origin/main
|
git reset --hard origin/main
|
||||||
buildBlog
|
buildBlog
|
||||||
elif [ ! -d "$PUBLIC_DIR" ] || [ ! -d "$TOR_DIR" ]; then
|
fi
|
||||||
echo "missing directories..."
|
|
||||||
|
if [ ! -d "$PUBLIC_DIR" ] || [ ! -d "$TOR_DIR" ]; then
|
||||||
|
# probably first time setup
|
||||||
|
echo "missing directories !!"
|
||||||
buildBlog
|
buildBlog
|
||||||
fi
|
fi
|
Loading…
Reference in New Issue
Block a user