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
|
||||
}
|
||||
|
||||
commit_msg="$(generate_commit_message)"
|
||||
|
||||
# Check if there are any new or modified files to commit
|
||||
if [ -n "$(get_new_posts)" ]; then
|
||||
# Add all new and modified files
|
||||
echo "$(generate_commit_message)"
|
||||
echo "$commit_msg"
|
||||
git add $(get_new_posts)
|
||||
|
||||
# Commit the changes with the generated message
|
||||
git commit -m "$(generate_commit_message)"
|
||||
git commit -m "$commit_msg"
|
||||
git push
|
||||
echo "Changes committed successfully."
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue
Block a user