From deda1260ea8b96debd88ad2fc91eca5eaa0673a8 Mon Sep 17 00:00:00 2001 From: qbizns Date: Wed, 1 Apr 2026 16:37:42 +0200 Subject: [PATCH] update-20260401-163742-19979 --- push.sh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 push.sh diff --git a/push.sh b/push.sh new file mode 100755 index 0000000..99f2a83 --- /dev/null +++ b/push.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash +set -e + +BRANCH="main" + +# Stop if not inside a git repo +git rev-parse --is-inside-work-tree >/dev/null 2>&1 || { + echo "Not inside a git repository." + exit 1 +} + +# Check if there are changes +if [ -z "$(git status --porcelain)" ]; then + echo "No changes to commit." + exit 0 +fi + +# Random commit message +MSG="update-$(date +%Y%m%d-%H%M%S)-$RANDOM" + +echo "Using commit message: $MSG" + +git add . +git commit -m "$MSG" +git push origin "$BRANCH" + +echo "Done." \ No newline at end of file