refactor(post-commit): simplify pre-release hook logic by removing unnecessary checks

This commit is contained in:
2026-06-18 16:21:27 +08:00
parent 1fc1635341
commit 6605c770c0
-13
View File
@@ -5,19 +5,6 @@ set -eu
SCRIPT_PATH="scripts/release/pre_release_web.sh"
if [ "${COZSWEET_SKIP_POST_COMMIT_PRE_RELEASE:-}" = "1" ]; then
echo "=== post-commit: skip pre-release hook (nested git operation) ==="
exit 0
fi
REPO_TOPLEVEL="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
cd "$REPO_TOPLEVEL"
if [ ! -f "$SCRIPT_PATH" ]; then
echo "=== post-commit: script not found: $SCRIPT_PATH ===" >&2
exit 1
fi
echo "=== post-commit: running $SCRIPT_PATH ==="
export COZSWEET_SKIP_POST_COMMIT_PRE_RELEASE=1
bash "$SCRIPT_PATH"