forked from openMF/mobile-wallet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ci-prepush.bat
31 lines (26 loc) · 850 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
@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 "detekt"
call :run_gradle_task ":mifospay-android:build"
call :run_gradle_task ":mifospay-android: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