Skip to content

Commit

Permalink
Error reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
b3nj5m1n committed Nov 25, 2023
1 parent c8d58c9 commit e7bf5ab
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/auto_commit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ if [ "$(git status --porcelain)" ]; then
cd "$REPO_DIR" && git -c user.name="$GIT_COMMITTER_NAME" -c user.email="$GIT_COMMITTER_EMAIL" commit --no-gpg-sign --author "$AUTHOR" -m "$MESSAGE" || notify "Failed committing changes in $REPO_DIR"
cd "$REPO_DIR" && printf "%s\n" "$SSH_PW" | git push || notify "Failed pushing changes in $REPO_DIR"
fi
if [ "$(cd "$REPO_DIR" && git diff --name-only --diff-filter=U --relative | head -c1 | wc -c)" -ne 0 ]; then
XDG_RUNTIME_DIR=/run/user/$(id -u) notify-send -u "critical" --wait "Something's gone very wrong: $REPO_DIR"
fi

notify "Done updating changes in $REPO_DIR"

Expand Down

0 comments on commit e7bf5ab

Please sign in to comment.