diff --git a/.githooks/post-commit b/.githooks/post-commit deleted file mode 100755 index d9a341b0..00000000 --- a/.githooks/post-commit +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/bash - -set -u - -REPO_ROOT="$(git rev-parse --show-toplevel 2>/dev/null)" -SCRIPT_PATH="$REPO_ROOT/scripts/release/pre_release_web.sh" -LOG_FILE="$REPO_ROOT/logs/post-commit.log" -COMMIT_HASH="$(git rev-parse --short HEAD 2>/dev/null || echo unknown)" -GIT_LOCAL_ENV_VARS="$(git rev-parse --local-env-vars 2>/dev/null || true)" - -mkdir -p "$(dirname "$LOG_FILE")" - -{ - echo "=== post-commit @ $(date +%Y-%m-%dT%H:%M:%S%z) ===" - echo "repo: $REPO_ROOT" - echo "commit: $COMMIT_HASH" - echo "script: $SCRIPT_PATH" - echo "" -} > "$LOG_FILE" - -if [ ! -x "$SCRIPT_PATH" ]; then - { - echo "=== ERROR: script not executable or not found ===" - echo "path: $SCRIPT_PATH" - echo "=== post-commit EXIT_CODE=127 @ $(date +%Y-%m-%dT%H:%M:%S%z) ===" - } >> "$LOG_FILE" - exit 127 -fi - -( - for var in $GIT_LOCAL_ENV_VARS; do - unset "$var" - done - "$SCRIPT_PATH" -) >> "$LOG_FILE" 2>&1 -EXIT_CODE=$? - -{ - echo "" - echo "=== post-commit EXIT_CODE=$EXIT_CODE @ $(date +%Y-%m-%dT%H:%M:%S%z) ===" -} >> "$LOG_FILE" - -exit "$EXIT_CODE" diff --git a/.gitignore b/.gitignore index 5edc52eb..03120840 100644 --- a/.gitignore +++ b/.gitignore @@ -61,3 +61,5 @@ public/workbox-*.js # Sentry Config File .env.sentry-build-plugin + +.githooks/post-commit \ No newline at end of file