Committed

This commit is contained in:
2025-12-23 15:54:48 +00:00
parent 1be8442480
commit 5e68ab0ee4

View File

@@ -12,6 +12,7 @@ echo "[INFO] Watching $TRIGGER_FILE..."
echo "[INFO] To trigger a git commit and push, run: trigger_git"
echo "PLEASE make sure that you have a good .gitignore file set up to avoid committing unwanted files."
DEFAULT_COMMIT_MSG="Committed"
#Do not know if the runs forrever loop is the best way to do this but it works
while true; do
if [[ -f "$TRIGGER_FILE" ]]; then
@@ -19,17 +20,18 @@ while true; do
echo "[INFO] Triggered at $(date)"
read -rp "Enter commit message: " COMMIT_MSG </dev/tty
if [[ -z "$COMMIT_MSG" ]]; then
COMMIT_MSG="Committed"
fi
# For some reason this is buggy as hell and does not work as espected...
# read -rp "Enter commit message: " COMMIT_MSG </dev/tty
# if [[ -z "$COMMIT_MSG" ]]; then
# COMMIT_MSG="Committed"
# fi
# Run Git commands
git status
sleep 0.5
git add .
sleep 0.5
git commit -m "$COMMIT_MSG"
git commit -m "$DEFAULT_COMMIT_MSG"
sleep 0.5
git push