-
Notifications
You must be signed in to change notification settings - Fork 435
/
ci-prepush.bat
33 lines (28 loc) · 945 Bytes
/
ci-prepush.bat
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
28
29
30
31
32
33
@echo off
setlocal enabledelayedexpansion
rem Check if gradlew exists in the project
if not exist "%~dp0gradlew" (
echo Error: gradlew not found in the project.
exit /b 1
)
echo Starting all checks and tests...
call :run_gradle_task "check -p build-logic"
call :run_gradle_task "spotlessApply --no-configuration-cache"
call :run_gradle_task "dependencyGuardBaseline"
call :run_gradle_task "formatVersionCatalog"
call :run_gradle_task "detekt"
call :run_gradle_task "testDemoDebug :lint:test :mifospay:lintProdRelease :lint:lint"
call :run_gradle_task "build"
call :run_gradle_task "updateProdReleaseBadging"
echo All checks and tests completed successfully.
exit /b 0
:run_gradle_task
echo ########################################################
echo Running: %~1
call "%~dp0gradlew" %~1
if %ERRORLEVEL% neq 0 (
echo Error: Task %~1 failed
exit /b 1
)
echo ########################################################
exit /b 0