diff --git a/firmware/gen_signature.sh b/firmware/gen_signature.sh index 599b2789e8..e0c166d137 100755 --- a/firmware/gen_signature.sh +++ b/firmware/gen_signature.sh @@ -14,6 +14,10 @@ echo "! Generated by gen_signature.sh" > ${SIGNATURE_FILE_NAME} echo "! SIGNATURE_HASH is a built-in variable generated by ConfigDefinition.jar" >> ${SIGNATURE_FILE_NAME} -echo "#define TS_SIGNATURE \"rusEFI $date.${SHORT_BOARDNAME}.@@SIGNATURE_HASH@@\"" >> ${SIGNATURE_FILE_NAME} +# read the current git branch name +branchname=`git branch --show-current` +echo "! Current branch is: $branchname" >> ${SIGNATURE_FILE_NAME} + +echo "#define TS_SIGNATURE \"rusEFI $branchname.$date.${SHORT_BOARDNAME}.@@SIGNATURE_HASH@@\"" >> ${SIGNATURE_FILE_NAME} exit 0 diff --git a/firmware/tunerstudio/upload_ini.sh b/firmware/tunerstudio/upload_ini.sh index 2b7e526493..b0b2b72741 100755 --- a/firmware/tunerstudio/upload_ini.sh +++ b/firmware/tunerstudio/upload_ini.sh @@ -28,22 +28,24 @@ echo "[upload_ini] Looking for signature in [$fileName]..." sig=$(grep "^\s*signature\s*=" $fileName | cut -f2 -d "=") if [ ! -z "$sig" -a "$sig" != " " ]; then echo "* found signature: $sig" - if [[ "$sig" =~ rusEFI.*([0-9]{4})\.([0-9]{2})\.([0-9]{2})\.([a-zA-Z0-9_-]+)\.([a-zA-Z0-9_-]+) ]]; then - year=${BASH_REMATCH[1]} - month=${BASH_REMATCH[2]} - day=${BASH_REMATCH[3]} - board=${BASH_REMATCH[4]} - hash=${BASH_REMATCH[5]} - path="$year/$month/$day/$board/$hash.ini" + if [[ "$sig" =~ rusEFI\ ([a-zA-Z0-9_-]+)\.([0-9]{4})\.([0-9]{2})\.([0-9]{2})\.([a-zA-Z0-9_-]+)\.([a-zA-Z0-9_-]+) ]]; then + branch=${BASH_REMATCH[1]} + year=${BASH_REMATCH[2]} + month=${BASH_REMATCH[3]} + day=${BASH_REMATCH[4]} + board=${BASH_REMATCH[5]} + hash=${BASH_REMATCH[6]} + path="$branch/$year/$month/$day/$board/$hash.ini" echo "* found path: $path" # we do not have ssh for this user # sftp does not support -p flag on mkdir :( sshpass -p $3 sftp -o StrictHostKeyChecking=no $2@$4 <