Merge branch 'master' into release/v3.3.x
This commit is contained in:
commit
fbf3c11daa
4 changed files with 26 additions and 11 deletions
16
.github/scripts/merge_packages.py
vendored
16
.github/scripts/merge_packages.py
vendored
|
|
@ -4,6 +4,7 @@
|
|||
# Usage:
|
||||
# python merge_packages.py package_esp8266com_index.json version/new/package_esp8266com_index.json
|
||||
# Written by Ivan Grokhotkov, 2015
|
||||
# Updated by lucasssvaz to handle Chinese version sorting, 2025
|
||||
#
|
||||
|
||||
from __future__ import print_function
|
||||
|
|
@ -36,20 +37,19 @@ def merge_objects(versions, obj):
|
|||
|
||||
|
||||
# Normalize ESP release version string (x.x.x) by adding '-rc<MAXINT>' (x.x.x-rc9223372036854775807)
|
||||
# to ensure having REL above any RC
|
||||
# to ensure having REL above any RC. CN version will be sorted after the official version if they happen
|
||||
# to be mixed (normally, CN and non-CN versions should not be mixed)
|
||||
# Dummy approach, functional anyway for current ESP package versioning
|
||||
# (unlike NormalizedVersion/LooseVersion/StrictVersion & similar crap)
|
||||
def pkgVersionNormalized(versionString):
|
||||
|
||||
verStr = str(versionString)
|
||||
verStr = str(versionString).replace("-cn", "")
|
||||
verParts = re.split(r"\.|-rc|-alpha", verStr, flags=re.IGNORECASE)
|
||||
|
||||
if len(verParts) == 3:
|
||||
if sys.version_info > (3, 0): # Python 3
|
||||
verStr = str(versionString) + "-rc" + str(sys.maxsize)
|
||||
else: # Python 2
|
||||
verStr = str(versionString) + "-rc" + str(sys.maxint)
|
||||
|
||||
if "-cn" in str(versionString):
|
||||
verStr = verStr + "-rc" + str(sys.maxsize // 2)
|
||||
else:
|
||||
verStr = verStr + "-rc" + str(sys.maxsize)
|
||||
elif len(verParts) != 4:
|
||||
print("pkgVersionNormalized WARNING: unexpected version format: {0})".format(verStr), file=sys.stderr)
|
||||
|
||||
|
|
|
|||
5
.github/scripts/release_append_cn.py
vendored
5
.github/scripts/release_append_cn.py
vendored
|
|
@ -17,8 +17,9 @@ import json
|
|||
|
||||
def append_cn_to_versions(obj):
|
||||
if isinstance(obj, dict):
|
||||
# dfu-util comes from arduino.cc and not from the Chinese mirrors, so we skip it
|
||||
if obj.get("name") == "dfu-util":
|
||||
# Skip tools that are not from the esp32 package
|
||||
packager = obj.get("packager")
|
||||
if packager is not None and packager != "esp32":
|
||||
return
|
||||
|
||||
for key, value in obj.items():
|
||||
|
|
|
|||
14
.github/scripts/update-version.sh
vendored
14
.github/scripts/update-version.sh
vendored
|
|
@ -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,15 @@ 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/')
|
||||
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"
|
||||
|
||||
echo "Updating platform.txt..."
|
||||
cat platform.txt | sed "s/version=.*/version=$ESP_ARDUINO_VERSION/g" > __platform.txt && mv __platform.txt platform.txt
|
||||
|
|
@ -31,6 +40,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 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
|
||||
|
||||
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" | \
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ from esp_docs.conf_docs import * # noqa: F403,F401
|
|||
|
||||
# Used for substituting variables in the documentation
|
||||
rst_prolog = """
|
||||
.. |version| replace:: 3.2.0
|
||||
.. |version| replace:: 3.2.1
|
||||
.. |idf_version| replace:: 5.4
|
||||
"""
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue