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/pre-commit
SeaswimmerTheFsh 5f8bc701be
All checks were successful
Autotagger / Autotagger (push) Successful in 5s
Build / Export Files (push) Successful in 6s
Build / Documentation (push) Successful in 19s
updated git hook
2024-03-24 04:24:10 -04:00

12 lines
320 B
Bash
Executable file

#!/bin/sh
echo "pre-commit: Refreshing packwiz"
cd src
packwiz refresh
echo "pre-commit: Adding changes to git"
git add .
echo "pre-commit: Amending commit with refreshed files"
PREV_COMMIT=$(git log -1 --pretty=%B)
git commit --amend --no-edit --no-verify --reuse-message="$PREV_COMMIT"
echo "pre-commit: Done"
exit 0