Mods added: - Better Compatibility Checker - Default Options - FramedBlocks Configs changed: - `aether-client.toml` - `aether-common.toml` - `bcc-common.toml` - `defaultoptions/keybindings.txt` KubeJS scripts modified: - `config/client.properties`
32 lines
1,018 B
Bash
Executable file
32 lines
1,018 B
Bash
Executable file
#!/bin/sh
|
|
project_root=$(git rev-parse --show-toplevel)
|
|
cd "$project_root"/src || exit
|
|
|
|
echo "post-commit: Checking version numbers"
|
|
packwiz_version=$(grep '^version =' pack.toml | awk -F'=' '{print $2}' | tr -d '"')
|
|
bcc_version=$(grep 'modpackVersion =' config/bcc-common.toml | awk -F'=' '{print $2}' | tr -d '"')
|
|
|
|
if [ "$packwiz_version" != "$bcc_version" ]; then
|
|
echo "post-commit: Version numbers do not match, updating config/bcc-common.toml"
|
|
sed -i "s/modpackVersion = .*/modpackVersion = \"$packwiz_version\"/" config/bcc-common.toml
|
|
else
|
|
echo "post-commit: Version numbers match"
|
|
fi
|
|
|
|
echo "post-commit: Refreshing packwiz"
|
|
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
|