dev #1

Merged
Gabriel merged 9 commits from dev into main 2025-12-23 15:55:37 +00:00
Showing only changes of commit 5e68ab0ee4 - Show all commits

View File

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