
All checks were successful
Build-Test-Publish / build (linux/arm64) (push) Successful in 25s
Build-Test-Publish / build (linux/amd64) (push) Successful in 46s
Build-Test-Publish / test-install-from-scratch (linux/amd64) (push) Successful in 7s
Build-Test-Publish / test-install-from-scratch (linux/arm64) (push) Successful in 8s
19 lines
484 B
Bash
Executable File
19 lines
484 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# find top folder of the git repo from current directory
|
|
|
|
MYDIR=$(git rev-parse --show-toplevel)
|
|
|
|
if [ -z "$MYDIR" ]; then
|
|
echo "Not in a git repository"
|
|
exit 1
|
|
fi
|
|
|
|
# do a git diff, and use AI to determine a good commit message.
|
|
|
|
# add all changes at $MYDIR level, commit with the message from AI, and push to origin.
|
|
|
|
git add .
|
|
git commit -m "$(git diff --name-only | xargs -I{} sh -c 'echo "{}: "; git diff --color=always {} | head -n 1')"
|
|
git push origin main
|