From 34264a321b12c55a3bbceb8268848d20f289a42b Mon Sep 17 00:00:00 2001 From: coehgns Date: Sun, 11 May 2025 13:44:04 +0900 Subject: [PATCH 1/4] =?UTF-8?q?feat=20(=20#9=20)=20:=20build-check.sh=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build-check.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 build-check.sh diff --git a/build-check.sh b/build-check.sh new file mode 100644 index 00000000..a08b49d2 --- /dev/null +++ b/build-check.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +cd "$(git rev-parse --show-toplevel)" || exit 1 + +echo "Gradle 빌드 검증 시작..." + +./gradlew clean build --no-daemon +BUILD_RESULT=$? + +if [ $BUILD_RESULT -ne 0 ]; then + echo "❌ 빌드 실패! 커밋이 중단됩니다." + exit 1 +else + echo "✅ 빌드 성공! 커밋 계속 진행합니다." + exit 0 +fi \ No newline at end of file From 5f0c20b69dfb54e98007f64a1df722a80832a4fb Mon Sep 17 00:00:00 2001 From: coehgns Date: Sun, 11 May 2025 13:44:42 +0900 Subject: [PATCH 2/4] =?UTF-8?q?feat=20(=20#9=20)=20:=20.pre-commit-config.?= =?UTF-8?q?yaml=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .pre-commit-config.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 00000000..625ecc9e --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,14 @@ +repos: + - repo: local + hooks: + - id: build-check + name: 빌드 검증 + entry: ./build-check.sh + language: script + pass_filenames: false + + - id: commit-msg-check + name: 커밋 메시지 포맷 검증 + entry: ./check-commit-message.sh + language: script + stages: [ commit-msg ] \ No newline at end of file From 0e4e0856188247820dc63b3698a0212b4d0abae0 Mon Sep 17 00:00:00 2001 From: coehgns Date: Sun, 11 May 2025 13:45:31 +0900 Subject: [PATCH 3/4] =?UTF-8?q?feat=20(=20#9=20)=20:=20check-commit-messag?= =?UTF-8?q?e.sh=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- check-commit-message.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 check-commit-message.sh diff --git a/check-commit-message.sh b/check-commit-message.sh new file mode 100644 index 00000000..5333a8af --- /dev/null +++ b/check-commit-message.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +commit_msg=$(cat "$1") + +regex="^(feat|fix|chore|docs|style|refactor|test|perf|ci|build|revert) \([[:space:]]*#[[:space:]]*[0-9]+[[:space:]]*\) : .+$" + +if [[ "$commit_msg" =~ $regex ]]; then + echo "✅ 커밋 메시지 형식이 올바릅니다." + exit 0 +else + echo "❌ 커밋 메시지 형식이 잘못되었습니다." + exit 1 +fi From 18b715fdcae452129296103717930fa43b065c96 Mon Sep 17 00:00:00 2001 From: coehgns Date: Sun, 11 May 2025 13:53:16 +0900 Subject: [PATCH 4/4] =?UTF-8?q?chore=20(=20#9=20)=20:=20sh=20=ED=8C=8C?= =?UTF-8?q?=EC=9D=BC=20=EA=B6=8C=ED=95=9C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build-check.sh | 0 check-commit-message.sh | 0 2 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 build-check.sh mode change 100644 => 100755 check-commit-message.sh diff --git a/build-check.sh b/build-check.sh old mode 100644 new mode 100755 diff --git a/check-commit-message.sh b/check-commit-message.sh old mode 100644 new mode 100755