Skip to content

Commit

Permalink
zigbee: fix application versioning in Zigbee project
Browse files Browse the repository at this point in the history
Allow a patch version higher than 9 in an APPLICATION_VERSION_STRING.

Signed-off-by: Mariusz Szypuła <[email protected]>
  • Loading branch information
mariusz-nordicsemi authored and rlubos committed Jan 24, 2025
1 parent 983977e commit aba9dc3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ Thread
Zigbee
------

|no_changes_yet_note|
* Fixed the :file:`zb_add_ota_header.py` script to allow a patch version higher than 9 in an ``APPLICATION_VERSION_STRING``.

Wi-Fi
-----
Expand Down
2 changes: 1 addition & 1 deletion scripts/bootloader/zb_add_ota_header.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def __add_optional_fields(self, fields_length, field_control_bit_mask, fields_fo

def convert_version_string_to_int(s):
"""Convert from semver string "1.2.3", to integer 1020003"""
match = re.match(r'^([0-9]+)\.([0-9]+)\.([0-9])(?:\+[0-9]+)?$', s)
match = re.match(r'^([0-9]+)\.([0-9]+)\.([0-9]+)(?:\+[0-9]+)?$', s)
if match is None:
raise ValueError('application-version-string parameter must be on the format x.y.z or x.y.z+t')
js = [0x100*0x10000, 0x10000, 1]
Expand Down

0 comments on commit aba9dc3

Please sign in to comment.