mirror of
https://github.com/peter-tanner/peter-tanner.github.io.git
synced 2024-11-30 12:00:18 +08:00
fix commit message not working for push script
This commit is contained in:
parent
ea73dad06b
commit
85ccd5c828
6
push.sh
6
push.sh
|
@ -10,14 +10,16 @@ generate_commit_message() {
|
||||||
get_new_posts
|
get_new_posts
|
||||||
}
|
}
|
||||||
|
|
||||||
|
commit_msg="$(generate_commit_message)"
|
||||||
|
|
||||||
# Check if there are any new or modified files to commit
|
# Check if there are any new or modified files to commit
|
||||||
if [ -n "$(get_new_posts)" ]; then
|
if [ -n "$(get_new_posts)" ]; then
|
||||||
# Add all new and modified files
|
# Add all new and modified files
|
||||||
echo "$(generate_commit_message)"
|
echo "$commit_msg"
|
||||||
git add $(get_new_posts)
|
git add $(get_new_posts)
|
||||||
|
|
||||||
# Commit the changes with the generated message
|
# Commit the changes with the generated message
|
||||||
git commit -m "$(generate_commit_message)"
|
git commit -m "$commit_msg"
|
||||||
git push
|
git push
|
||||||
echo "Changes committed successfully."
|
echo "Changes committed successfully."
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue
Block a user