reducing scripts duplication

This commit is contained in:
rusefi 2019-06-08 10:35:16 -04:00
parent 95003e9a7b
commit 126745ab35
5 changed files with 18 additions and 19 deletions

View File

@ -1,20 +1,21 @@
set COMPILE_FOLDER=%1
set COMPILE_SCRIPT=%2
set BOARD_NAME=%2
set script_name=combile_and_upload.bat
echo Entering %script_name% with %COMPILE_FOLDER% %COMPILE_SCRIPT%
echo Entering %script_name% with %COMPILE_FOLDER% %BOARD_NAME%
if %COMPILE_FOLDER%.==. (
echo COMPILE_FOLDER parameter expected
exit -1
)
if %COMPILE_SCRIPT%.==. (
echo COMPILE_SCRIPT parameter expected
if %BOARD_NAME%.==. (
echo BOARD_NAME parameter expected
exit -1
)
set COMPILE_SCRIPT=!compile-%BOARD_NAME%.bat
cd firmware
call clean.bat
@ -27,6 +28,10 @@ pwd
echo Invoking %COMPILE_SCRIPT%
call %COMPILE_SCRIPT%
if not exist build/rusefi.hex echo Just to confirm - FAILED to compile with %COMPILE_SCRIPT%
if not exist build/rusefi.hex exit -1
cd ..
rem We are back at root rusEfi folder
pwd
echo "exiting %script_name%"

View File

@ -9,26 +9,20 @@ call misc\jenkins\build_java_console.bat
if not exist java_console_binary/rusefi_console.jar exit -1
call misc\jenkins\compile_other_versions\compile_and_upload.bat nucleo_f746 !compile-nucleo_f746.bat
pwd
echo %script_name%: Compiling F746
if not exist build/rusefi.hex echo Just to confirm - FAILED to compile nucleo_f746
if not exist build/rusefi.hex exit -1
cd ..
pwd
set bundle_name=stm32f746_nucleo
call misc\jenkins\compile_other_versions\compile_and_upload.bat nucleo_f746 stm32f746_nucleo
IF NOT ERRORLEVEL 0 echo ERROR invoking compile_and_upload.bat
IF NOT ERRORLEVEL 0 EXIT /B 1
pwd
call misc\jenkins\compile_other_versions\build_version.bat
echo %script_name%: Done with F746-nucleo
call misc\jenkins\compile_other_versions\compile_and_upload.bat nucleo_f767 !compile-nucleo_f767.bat
pwd
echo %script_name%: Compiling F767
if not exist build/rusefi.hex echo Just to confirm - FAILED to compile nucleo_f767
if not exist build/rusefi.hex exit -1
cd ..
pwd
set bundle_name=stm32f767_nucleo
call misc\jenkins\compile_other_versions\compile_and_upload.bat nucleo_f767 stm32f767_nucleo
IF NOT ERRORLEVEL 0 echo ERROR invoking compile_and_upload.bat
IF NOT ERRORLEVEL 0 EXIT /B 1
pwd
call misc\jenkins\compile_other_versions\build_version.bat
echo %script_name%: Done with F767-nucleo