fome-fw/misc/jenkins/compile_other_versions/compile_and_upload.sh

42 lines
835 B
Bash

#!/bin/sh
# for example 'proteus'
BOARD_NAME="$1"
# for example 'mre-f4'
export BUNDLE_NAME="$2"
export INI_FILE_OVERRIDE="$3"
export RUSEFI_CONSOLE_SETTINGS="$4"
SCRIPT_NAME=compile_and_upload.sh
echo "Entering $SCRIPT_NAME with 1=$1 2=$2 3=$3 4=$4"
[ -n $BOARD_NAME ] || { echo "BOARD_NAME parameter expected"; exit 1; }
[ -n $BUNDLE_NAME ] || { echo "BUNDLE_NAME parameter expected"; exit 1; }
COMPILE_SCRIPT="compile_$BUNDLE_NAME.sh"
cd firmware
sh clean.sh
cd ..
cd firmware/config/boards
pwd
cd $BOARD_NAME
pwd
echo "Invoking $COMPILE_SCRIPT"
sh $COMPILE_SCRIPT
[ -e ../../../build/rusefi.hex ] || { echo "Just to confirm - FAILED to compile with $COMPILE_SCRIPT"; exit 1; }
cd ../../../..
# We are back at root rusEfi folder
pwd
sh misc/jenkins/compile_other_versions/prepare_bundle.sh
echo "exiting $SCRIPT_NAME"