We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ea51d45 commit 19559d1Copy full SHA for 19559d1
.github/scripts/install-hooks.sh
@@ -0,0 +1,6 @@
1
+#!/bin/sh
2
+
3
+# sh .github/scripts/install-hooks.sh 명령어로 실행하시면 됩니다.
4
+cp .github/scripts/pre-push-build.sh .git/hooks/pre-push
5
+chmod +x .git/hooks/pre-push
6
+echo "pre-push hook 설치 완료!"
.github/scripts/pre-push-build.sh
@@ -0,0 +1,20 @@
+BRANCH=$(git rev-parse --abbrev-ref HEAD)
+echo "현재 브랜치: $BRANCH"
+if [ "$BRANCH" = "develop" ]; then
7
+ echo "develop 브랜치 빌드 검사 시작 (spring.profiles.active=dev)..."
8
9
+ ./gradlew clean build -x test -Dspring.profiles.active=dev
10
+ if [ $? -ne 0 ]; then
11
+ echo "빌드 실패! push 차단"
12
+ exit 1
13
+ fi
14
15
+ echo "빌드 성공! push 진행."
16
+else
17
+ echo "$BRANCH 브랜치는 빌드 체크 없이 push 허용"
18
+fi
19
20
+exit 0
0 commit comments