18 lines
485 B
Bash
Executable File
18 lines
485 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Desktop semver pre-push hook 설치
|
|
set -euo pipefail
|
|
|
|
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
|
HOOK_SRC="$ROOT/scripts/hooks/pre-push"
|
|
GIT_HOOK="$ROOT/.git/hooks/pre-push"
|
|
|
|
if [[ ! -d "$ROOT/.git" ]]; then
|
|
echo "ERROR: git repo 가 아닙니다: $ROOT" >&2
|
|
exit 1
|
|
fi
|
|
|
|
cp "$HOOK_SRC" "$GIT_HOOK"
|
|
chmod +x "$GIT_HOOK"
|
|
echo "[install-desktop-git-hooks] pre-push hook 설치됨"
|
|
echo " Desktop/Frontend 변경 시 ./scripts/push-with-desktop-version.sh 사용"
|