21 lines
392 B
Bash
Executable File
21 lines
392 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Default commit message with current timestamp
|
|
COMMIT_MSG="Deploy: $(date '+%Y-%m-%d %H:%M:%S')"
|
|
|
|
# Use custom commit message if provided as argument
|
|
if [ ! -z "$1" ]; then
|
|
COMMIT_MSG="$1"
|
|
fi
|
|
|
|
echo "Adding all files..."
|
|
git add .
|
|
|
|
echo "Committing with message: '$COMMIT_MSG'"
|
|
git commit -m "$COMMIT_MSG"
|
|
|
|
echo "Pushing to origin main..."
|
|
git push origin main
|
|
|
|
echo "Done!"
|