16 lines
427 B
Bash
Executable file
16 lines
427 B
Bash
Executable file
#!/bin/sh
|
|
|
|
echo "post-commit: Refreshing packwiz"
|
|
cd src
|
|
packwiz refresh
|
|
echo "post-commit: Adding changes to git"
|
|
git add .
|
|
echo "post-commit: Checking for changes"
|
|
if git diff-index HEAD --; then
|
|
echo "post-commit: No changes detected, exiting"
|
|
exit 0
|
|
fi
|
|
echo "post-commit: Amending commit with refreshed files"
|
|
git commit --amend --gpg-sign --no-edit --no-verify --reuse-message=HEAD
|
|
echo "post-commit: Done"
|
|
exit 0
|