chore: wire release hook and service updates
This commit is contained in:
Executable
+23
@@ -0,0 +1,23 @@
|
||||
#!/bin/sh
|
||||
# Post-commit hook: 本地提交后自动执行 Web 预发布脚本。
|
||||
|
||||
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"
|
||||
Reference in New Issue
Block a user