From 8e1c3b663965f82e271ea22c16e666a709be01e6 Mon Sep 17 00:00:00 2001 From: mikee47 Date: Thu, 11 Jan 2024 09:26:56 +0000 Subject: [PATCH] Fix esp32 IDF version number handling for minor releases For example where branch is tagged 'v5.0.5-173-g9d6770dfbb' we require just 'v5.0' to identify toolsets, python, etc. --- Sming/Arch/Esp32/build.mk | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Sming/Arch/Esp32/build.mk b/Sming/Arch/Esp32/build.mk index 4db95bf8c7..790f0e3fe3 100644 --- a/Sming/Arch/Esp32/build.mk +++ b/Sming/Arch/Esp32/build.mk @@ -12,9 +12,13 @@ export IDF_PATH := $(call FixPath,$(IDF_PATH)) # Extract IDF version ifndef IDF_VER +# e.g. v5.2-beta1-265-g405b8b5512 or v5.0.5-173-g9d6770dfbb IDF_VER := $(shell (cd $$IDF_PATH && git describe --always --tags --dirty) | cut -c 1-31) endif -IDF_VERSION := $(firstword $(subst -, ,$(IDF_VER))) +# Now just vmajor.minor +IDF_VERSION := $(subst ., ,$(firstword $(subst -, ,$(IDF_VER)))) +IDF_VERSION := $(firstword $(IDF_VERSION)).$(word 2,$(IDF_VERSION)) +$(error $(IDF_VERSION)) # By default, downloaded tools will be installed under $HOME/.espressif directory # (%USERPROFILE%/.espressif on Windows). This path can be modified by setting