-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup-git-hooks.bat
More file actions
27 lines (25 loc) Β· 823 Bytes
/
setup-git-hooks.bat
File metadata and controls
27 lines (25 loc) Β· 823 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
@echo off
echo π§ Git Hook μ€μ μ μμν©λλ€...
:: pre-commit hook μμ±
(
echo #!/bin/sh
echo.
echo echo "π ktlint κ²μ¬λ₯Ό μ€νν©λλ€..."
echo ./gradlew ktlintCheck
echo.
echo if [ $? -ne 0 ]; then
echo echo "β ktlint κ²μ¬ μ€ν¨! μλ μμ μ μ€νν©λλ€..."
echo ./gradlew ktlintFormat
echo echo "β
μ½λκ° μλ μμ λμμ΅λλ€. λ³κ²½μ¬νμ μΆκ°νκ³ λ€μ 컀λ°νμΈμ."
echo echo "λ€μ λͺ
λ Ήμ΄λ₯Ό μ€ννμΈμ:"
echo echo " git add ."
echo echo " git commit -m \"your commit message\""
echo exit 1
echo fi
echo.
echo echo "β
ktlint κ²μ¬ ν΅κ³Ό!"
echo exit 0
) > .git\hooks\pre-commit
echo β
Git Hook μ€μ μ΄ μλ£λμμ΅λλ€!
echo μ΄μ 컀λ°ν λλ§λ€ μλμΌλ‘ ktlint κ²μ¬κ° μ€νλ©λλ€.
pause