reducing scripts duplication

This commit is contained in:
rusefi 2019-06-07 19:50:46 -04:00
parent 0fb89c4f7b
commit bf731485b6
5 changed files with 43 additions and 14 deletions

View File

@ -2,6 +2,9 @@ rem
rem STM32F767 version of the firmware for Nucleo-F746ZG board
rem
bundle_nameset script_name=!compile-nucleo_f746.bat
echo Entering %script_name%
cd ../../..
set PROJECT_BOARD=nucleo_F746
set PROJECT_CPU=ARCH_STM32F7

View File

@ -2,6 +2,9 @@ rem
rem STM32F767 version of the firmware for Nucleo-F767ZI board
rem
bundle_nameset script_name=!compile-nucleo_f767.bat
echo Entering %script_name%
cd ../../..
set PROJECT_BOARD=nucleo_f767
set PROJECT_CPU=ARCH_STM32F7

View File

@ -1,5 +1,5 @@
set script_name=build_version.bat
echo Entering %script_name%
bundle_nameset script_name=build_version.bat
echo Entering %script_name% with %bundle_name%
rm -rf temp
@ -9,7 +9,7 @@ set folder=temp\%folder%
rem this replaces spaces with 0s - that's needed before 10am
set folder=%folder: =0%
echo Building file
echo Packaging temp\rusefi_bundle.zip file
call misc\jenkins\build_working_folder.bat
rem TODO: extract FTP duplication with 407 build

View File

@ -0,0 +1,30 @@
set COMPILE_FOLDER=%1
set COMPILE_SCRIPT=%2
bundle_nameset script_name=combile_and_upload.bat
echo Entering %script_name% with %COMPILE_FOLDER% %COMPILE_SCRIPT%
if %COMPILE_FOLDER%.==. (
echo COMPILE_FOLDER parameter expected
exit -1
)
if %COMPILE_SCRIPT%.==. (
echo COMPILE_SCRIPT parameter expected
exit -1
)
cd firmware
call clean.bat
cd ..
cd firmware\config
cd %COMPILE_FOLDER%
call %COMPILE_SCRIPT%
pwd
echo "exiting %script_name%"

View File

@ -9,13 +9,9 @@ call misc\jenkins\build_java_console.bat
if not exist java_console_binary/rusefi_console.jar exit -1
cd firmware
call clean.bat
cd ..
call misc\jenkins\compile_other_versions\compile_and_upload.bat nucleo_f746 !compile-nucleo_f746.bat
pwd
echo %script_name%: Compiling F746
cd firmware\config\boards\nucleo_f746
call !compile-nucleo_f746.bat
if not exist build/rusefi.hex echo Just to confirm - FAILED to compile nucleo_f746
if not exist build/rusefi.hex exit -1
cd ..
@ -25,12 +21,9 @@ call misc\jenkins\compile_other_versions\build_version.bat
echo %script_name%: Done with F746-nucleo
cd firmware
call clean.bat
cd ..
call misc\jenkins\compile_other_versions\compile_and_upload.bat nucleo_f767 !compile-nucleo_f767.bat
pwd
echo %script_name%: Compiling F767
cd firmware\config\boards\nucleo_f767
call !compile-nucleo_f767.bat
if not exist build/rusefi.hex echo Just to confirm - FAILED to compile nucleo_f767
if not exist build/rusefi.hex exit -1
cd ..