mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-10-14 08:47:45 -04:00
Update code to extract versions from string (#678)
This is needed to correctly handle patch versions. Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
This commit is contained in:
parent
687c50f390
commit
1b2c5605ca
1 changed files with 3 additions and 2 deletions
5
.github/scripts/release.py
vendored
5
.github/scripts/release.py
vendored
|
@ -253,8 +253,9 @@ class KernelRelease(BaseRelease):
|
||||||
def updateVersionMacros(self, version_str):
|
def updateVersionMacros(self, version_str):
|
||||||
info('Updating version macros in task.h for "%s"' % version_str)
|
info('Updating version macros in task.h for "%s"' % version_str)
|
||||||
|
|
||||||
# Strip out any non-numeric or '.' characters before setting major / minor / build
|
# Extract major / minor / build from the version string.
|
||||||
(major, minor, build) = re.sub("[^0-9.]", "", version_str).split('.')
|
ver = re.search(r'([\d.]+)', version_str).group(1)
|
||||||
|
(major, minor, build) = ver.split('.')
|
||||||
update_freertos_version_macros(os.path.join(self.repo_path, 'include', 'task.h'), version_str, major, minor, build)
|
update_freertos_version_macros(os.path.join(self.repo_path, 'include', 'task.h'), version_str, major, minor, build)
|
||||||
|
|
||||||
self.commitChanges(self.commit_msg_prefix + 'Bump task.h version macros to "%s"' % version_str)
|
self.commitChanges(self.commit_msg_prefix + 'Bump task.h version macros to "%s"' % version_str)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue