mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-21 02:04:26 +08:00
fix the issue of checking the result code
This commit is contained in:
@@ -89,7 +89,7 @@ goto :pre_parse_args
|
|||||||
|
|
||||||
:post_parse_args
|
:post_parse_args
|
||||||
if "%RELEASE%"=="" set "RELEASE=0"
|
if "%RELEASE%"=="" set "RELEASE=0"
|
||||||
|
|
||||||
if "%RELEASE%"=="0" (
|
if "%RELEASE%"=="0" (
|
||||||
set "RELEASE_TYPE=snapshot"
|
set "RELEASE_TYPE=snapshot"
|
||||||
) else (
|
) else (
|
||||||
@@ -122,6 +122,7 @@ goto :pre_parse_args
|
|||||||
goto :end
|
goto :end
|
||||||
|
|
||||||
:build_backend
|
:build_backend
|
||||||
|
setlocal enabledelayedexpansion
|
||||||
echo Pulling backend dependencies...
|
echo Pulling backend dependencies...
|
||||||
call go get .
|
call go get .
|
||||||
|
|
||||||
@@ -129,7 +130,7 @@ goto :pre_parse_args
|
|||||||
echo Executing backend lint checking...
|
echo Executing backend lint checking...
|
||||||
call go vet -v .\...
|
call go vet -v .\...
|
||||||
|
|
||||||
if not "%errorlevel%"=="0" (
|
if !errorlevel! neq 0 (
|
||||||
call :echo_red "Error: Failed to pass lint checking"
|
call :echo_red "Error: Failed to pass lint checking"
|
||||||
goto :end
|
goto :end
|
||||||
)
|
)
|
||||||
@@ -140,12 +141,14 @@ goto :pre_parse_args
|
|||||||
call go clean -cache
|
call go clean -cache
|
||||||
call go test .\... -v
|
call go test .\... -v
|
||||||
|
|
||||||
if not "%errorlevel%"=="0" (
|
if !errorlevel! neq 0 (
|
||||||
call :echo_red "Error: Failed to pass unit testing"
|
call :echo_red "Error: Failed to pass unit testing"
|
||||||
goto :end
|
goto :end
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
endlocal
|
||||||
|
|
||||||
set "CGO_ENABLED=1"
|
set "CGO_ENABLED=1"
|
||||||
|
|
||||||
setlocal
|
setlocal
|
||||||
@@ -166,6 +169,7 @@ goto :pre_parse_args
|
|||||||
goto :eof
|
goto :eof
|
||||||
|
|
||||||
:build_frontend
|
:build_frontend
|
||||||
|
setlocal enabledelayedexpansion
|
||||||
echo Pulling frontend dependencies...
|
echo Pulling frontend dependencies...
|
||||||
call npm install
|
call npm install
|
||||||
|
|
||||||
@@ -174,12 +178,14 @@ goto :pre_parse_args
|
|||||||
|
|
||||||
call npm run lint
|
call npm run lint
|
||||||
|
|
||||||
if not "%errorlevel%"=="0" (
|
if !errorlevel! neq 0 (
|
||||||
call :echo_red "Error: Failed to pass lint checking"
|
call :echo_red "Error: Failed to pass lint checking"
|
||||||
goto :end
|
goto :end
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
endlocal
|
||||||
|
|
||||||
echo Building frontend files(%RELEASE_TYPE%)...
|
echo Building frontend files(%RELEASE_TYPE%)...
|
||||||
|
|
||||||
if "%RELEASE%"=="0" (
|
if "%RELEASE%"=="0" (
|
||||||
@@ -193,7 +199,7 @@ goto :pre_parse_args
|
|||||||
goto :eof
|
goto :eof
|
||||||
|
|
||||||
:build_package
|
:build_package
|
||||||
setlocal
|
setlocal enabledelayedexpansion
|
||||||
set "package_file_name=%VERSION%"
|
set "package_file_name=%VERSION%"
|
||||||
|
|
||||||
if "%RELEASE%"=="0" (
|
if "%RELEASE%"=="0" (
|
||||||
@@ -221,7 +227,7 @@ goto :pre_parse_args
|
|||||||
|
|
||||||
cd package
|
cd package
|
||||||
|
|
||||||
if not "%errorlevel%"=="0" (
|
if !errorlevel! neq 0 (
|
||||||
call :echo_red "Error: Build Failed"
|
call :echo_red "Error: Build Failed"
|
||||||
goto :end
|
goto :end
|
||||||
)
|
)
|
||||||
@@ -244,4 +250,4 @@ goto :pre_parse_args
|
|||||||
set "BUILD_UNIXTIME="
|
set "BUILD_UNIXTIME="
|
||||||
set "BUILD_DATE="
|
set "BUILD_DATE="
|
||||||
set "PACKAGE_FILENAME="
|
set "PACKAGE_FILENAME="
|
||||||
exit /B
|
exit /B
|
||||||
|
|||||||
Reference in New Issue
Block a user