Skip to content

Commit

Permalink
Fix esp32 IDF version number handling for minor releases
Browse files Browse the repository at this point in the history
For example where branch is tagged 'v5.0.5-173-g9d6770dfbb' we require just 'v5.0' to identify toolsets, python, etc.
  • Loading branch information
mikee47 committed Jan 11, 2024
1 parent eba0793 commit 8e1c3b6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Sming/Arch/Esp32/build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8e1c3b6

Please sign in to comment.