From 61aeed196b412ca0c57a8b7a52593215752f1e37 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Thu, 20 May 2021 08:40:59 +0100 Subject: some log bugfixing, also add another alternate config file path --- packages/git.source.sh | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'packages/git.source.sh') diff --git a/packages/git.source.sh b/packages/git.source.sh index 9ee238cc..ca1f4750 100644 --- a/packages/git.source.sh +++ b/packages/git.source.sh @@ -26,20 +26,13 @@ git::commit () { local -r message="$1"; shift cd "$content_dir" &>/dev/null + set +e git commit -a -m "$message" if [[ "$GIT_PUSH" == yes ]]; then + log INFO "Invoking git pull/push in $content_dir" git pull git push fi - cd - &>/dev/null -} - -# Commit all changes -git::commit () { - local -r content_dir="$CONTENT_BASE_DIR/$1"; shift - local -r message="$1"; shift - - cd "$content_dir" &>/dev/null - git commit -a -m "$message" + set -e cd - &>/dev/null } -- cgit v1.2.3