This repository has been archived on 2025-03-02. You can view files and clone it, but cannot push or open issues or pull requests.
GalacticFactory-Legacy/scripts/hooks/post-commit
SeaswimmerTheFsh e4c6fb3cec
All checks were successful
Autotagger / Autotagger (push) Successful in 5s
Build / Export Files (push) Successful in 7s
Build / Documentation (push) Successful in 20s
fixed infinite looping in the post-commit hook
2024-03-24 21:53:27 -04:00

16 lines
406 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
echo "post-commit: Done"
exit 0