From 7b9c471a1153da6db80d08be7f21618e585caaa8 Mon Sep 17 00:00:00 2001 From: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com> Date: Mon, 7 Jul 2025 15:01:57 -0300 Subject: [PATCH 1/3] feat(docs_version): Update docs in update-version script --- .github/scripts/update-version.sh | 10 ++++++++++ docs/conf_common.py | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/scripts/update-version.sh b/.github/scripts/update-version.sh index 9a38b27a57a..cbb9948ef75 100755 --- a/.github/scripts/update-version.sh +++ b/.github/scripts/update-version.sh @@ -1,4 +1,5 @@ #!/bin/bash +# Disable shellcheck warning about using 'cat' to read a file. # shellcheck disable=SC2002 # For reference: add tools for all boards by replacing one line in each board @@ -23,7 +24,11 @@ ESP_ARDUINO_VERSION_MINOR="$2" ESP_ARDUINO_VERSION_PATCH="$3" ESP_ARDUINO_VERSION="$ESP_ARDUINO_VERSION_MAJOR.$ESP_ARDUINO_VERSION_MINOR.$ESP_ARDUINO_VERSION_PATCH" +# Get ESP-IDF version from push.yml (this way we can ensure that the version is correct even if the local libs are not up to date) +ESP_IDF_VERSION=$(grep "idf_ver:" .github/workflows/push.yml | sed 's/.*release-v\([^"]*\).*/\1/') + echo "New Arduino Version: $ESP_ARDUINO_VERSION" +echo "ESP-IDF Version: $ESP_IDF_VERSION" echo "Updating platform.txt..." cat platform.txt | sed "s/version=.*/version=$ESP_ARDUINO_VERSION/g" > __platform.txt && mv __platform.txt platform.txt @@ -31,6 +36,11 @@ cat platform.txt | sed "s/version=.*/version=$ESP_ARDUINO_VERSION/g" > __platfor echo "Updating package.json..." cat package.json | sed "s/.*\"version\":.*/ \"version\": \"$ESP_ARDUINO_VERSION\",/g" > __package.json && mv __package.json package.json +echo "Updating conf_common.py..." +cat docs/conf_common.py | \ +sed "s/.. |version| replace:: .*/.. |version| replace:: $ESP_ARDUINO_VERSION/g" | \ +sed "s/.. |idf_version| replace:: .*/.. |idf_version| replace:: $ESP_IDF_VERSION/g" > docs/__conf_common.py && mv docs/__conf_common.py docs/conf_common.py + echo "Updating cores/esp32/esp_arduino_version.h..." cat cores/esp32/esp_arduino_version.h | \ sed "s/#define ESP_ARDUINO_VERSION_MAJOR.*/#define ESP_ARDUINO_VERSION_MAJOR $ESP_ARDUINO_VERSION_MAJOR/g" | \ diff --git a/docs/conf_common.py b/docs/conf_common.py index 6945c0d190d..af1d615f753 100644 --- a/docs/conf_common.py +++ b/docs/conf_common.py @@ -4,7 +4,7 @@ # Used for substituting variables in the documentation rst_prolog = """ -.. |version| replace:: 3.2.0 +.. |version| replace:: 3.2.1 .. |idf_version| replace:: 5.4 """ From c0800c732d01a8616f7b6e8d77175b3bfbe83fc0 Mon Sep 17 00:00:00 2001 From: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com> Date: Mon, 7 Jul 2025 15:22:14 -0300 Subject: [PATCH 2/3] fix(logging): Fix log message --- .github/scripts/update-version.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/scripts/update-version.sh b/.github/scripts/update-version.sh index cbb9948ef75..0eaf2096951 100755 --- a/.github/scripts/update-version.sh +++ b/.github/scripts/update-version.sh @@ -36,7 +36,7 @@ cat platform.txt | sed "s/version=.*/version=$ESP_ARDUINO_VERSION/g" > __platfor echo "Updating package.json..." cat package.json | sed "s/.*\"version\":.*/ \"version\": \"$ESP_ARDUINO_VERSION\",/g" > __package.json && mv __package.json package.json -echo "Updating conf_common.py..." +echo "Updating docs/conf_common.py..." cat docs/conf_common.py | \ sed "s/.. |version| replace:: .*/.. |version| replace:: $ESP_ARDUINO_VERSION/g" | \ sed "s/.. |idf_version| replace:: .*/.. |idf_version| replace:: $ESP_IDF_VERSION/g" > docs/__conf_common.py && mv docs/__conf_common.py docs/conf_common.py From 8890a6010db2c8efa6fa723c78335962bb0172cc Mon Sep 17 00:00:00 2001 From: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com> Date: Tue, 8 Jul 2025 08:35:36 -0300 Subject: [PATCH 3/3] fix(idf_version): Add error if IDF version is not found --- .github/scripts/update-version.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/scripts/update-version.sh b/.github/scripts/update-version.sh index 0eaf2096951..622f2fe8ff8 100755 --- a/.github/scripts/update-version.sh +++ b/.github/scripts/update-version.sh @@ -26,6 +26,10 @@ ESP_ARDUINO_VERSION="$ESP_ARDUINO_VERSION_MAJOR.$ESP_ARDUINO_VERSION_MINOR.$ESP_ # Get ESP-IDF version from push.yml (this way we can ensure that the version is correct even if the local libs are not up to date) ESP_IDF_VERSION=$(grep "idf_ver:" .github/workflows/push.yml | sed 's/.*release-v\([^"]*\).*/\1/') +if [ -z "$ESP_IDF_VERSION" ]; then + echo "Error: ESP-IDF version not found in push.yml" >&2 + exit 1 +fi echo "New Arduino Version: $ESP_ARDUINO_VERSION" echo "ESP-IDF Version: $ESP_IDF_VERSION"