Committed
This commit is contained in:
@@ -16,11 +16,23 @@ echo "PLEASE make sure that you have a good .gitignore file set up to avoid comm
|
|||||||
while true; do
|
while true; do
|
||||||
if [[ -f "$TRIGGER_FILE" ]]; then
|
if [[ -f "$TRIGGER_FILE" ]]; then
|
||||||
rm -f "$TRIGGER_FILE"
|
rm -f "$TRIGGER_FILE"
|
||||||
|
|
||||||
echo "[INFO] Triggered at $(date)"
|
echo "[INFO] Triggered at $(date)"
|
||||||
|
|
||||||
|
# Prompt the user for a commit message
|
||||||
|
read -rp "Enter commit message: " COMMIT_MSG
|
||||||
|
# Fallback if the user presses enter without typing a message
|
||||||
|
if [[ -z "$COMMIT_MSG" ]]; then
|
||||||
|
COMMIT_MSG="Committed"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Run Git commands
|
||||||
git status
|
git status
|
||||||
git add .
|
git add .
|
||||||
git commit -m "Committed"
|
git commit -m "$COMMIT_MSG"
|
||||||
git push
|
git push
|
||||||
|
|
||||||
|
echo "[INFO] Git commands completed at $(date)"
|
||||||
fi
|
fi
|
||||||
sleep 0.5
|
sleep 0.5
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user