-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.bat
25 lines (23 loc) · 999 Bytes
/
build.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
@echo off
rem # This script is used to start the mage build workflow. Without additional options it will simply recompile the project
rem #
rem # You might want to call this script with -h to get the mage help output
rem # You can also call the script with -l to list all valide targets
set SRCPIT_DIR=%~dp0%
pushd "%SRCPIT_DIR%build\workflow"
echo "go run %SRCPIT_DIR%build\workflow\mage.go -d %SRCPIT_DIR%build\workflow\magefiles -compile %temp%\gpsa-mage-build.exe"
go run "%SRCPIT_DIR%build\workflow\mage.go" -d "%SRCPIT_DIR%build\workflow\magefiles" -compile "%temp%\gpsa-mage-build.exe"
set mage_compile_error=%ERRORLEVEL%
if "%mage_compile_error%" NEQ "0" (
echo "Error: go run ./mage.go --compile"
popd
exit /B %mage_compile_error%
)
echo "%temp%\gpsa-mage-build.exe %*"
%temp%\gpsa-mage-build.exe %*
set build_error_code=%ERRORLEVEL%
if "%build_error_code%" NEQ "0" (
echo "Error: go run ./mage.go exit with error"
)
popd
exit /B %build_error_code%