Skip to content

Commit 7b9c471

Browse files
committed
feat(docs_version): Update docs in update-version script
1 parent b709a78 commit 7b9c471

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.github/scripts/update-version.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/bin/bash
2+
# Disable shellcheck warning about using 'cat' to read a file.
23
# shellcheck disable=SC2002
34

45
# For reference: add tools for all boards by replacing one line in each board
@@ -23,14 +24,23 @@ ESP_ARDUINO_VERSION_MINOR="$2"
2324
ESP_ARDUINO_VERSION_PATCH="$3"
2425
ESP_ARDUINO_VERSION="$ESP_ARDUINO_VERSION_MAJOR.$ESP_ARDUINO_VERSION_MINOR.$ESP_ARDUINO_VERSION_PATCH"
2526

27+
# 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)
28+
ESP_IDF_VERSION=$(grep "idf_ver:" .github/workflows/push.yml | sed 's/.*release-v\([^"]*\).*/\1/')
29+
2630
echo "New Arduino Version: $ESP_ARDUINO_VERSION"
31+
echo "ESP-IDF Version: $ESP_IDF_VERSION"
2732

2833
echo "Updating platform.txt..."
2934
cat platform.txt | sed "s/version=.*/version=$ESP_ARDUINO_VERSION/g" > __platform.txt && mv __platform.txt platform.txt
3035

3136
echo "Updating package.json..."
3237
cat package.json | sed "s/.*\"version\":.*/ \"version\": \"$ESP_ARDUINO_VERSION\",/g" > __package.json && mv __package.json package.json
3338

39+
echo "Updating conf_common.py..."
40+
cat docs/conf_common.py | \
41+
sed "s/.. |version| replace:: .*/.. |version| replace:: $ESP_ARDUINO_VERSION/g" | \
42+
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
43+
3444
echo "Updating cores/esp32/esp_arduino_version.h..."
3545
cat cores/esp32/esp_arduino_version.h | \
3646
sed "s/#define ESP_ARDUINO_VERSION_MAJOR.*/#define ESP_ARDUINO_VERSION_MAJOR $ESP_ARDUINO_VERSION_MAJOR/g" | \

docs/conf_common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
# Used for substituting variables in the documentation
66
rst_prolog = """
7-
.. |version| replace:: 3.2.0
7+
.. |version| replace:: 3.2.1
88
.. |idf_version| replace:: 5.4
99
"""
1010

0 commit comments

Comments
 (0)