mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-10-14 16:57:41 -04:00
Updating kernel release script to update source files with tags and release in separate scripts (#1016)
* separating source file updation to separate script * give execute permission to update_src_version.py
This commit is contained in:
parent
11ebab0488
commit
f6f2b67141
2 changed files with 173 additions and 33 deletions
33
.github/scripts/release.py
vendored
33
.github/scripts/release.py
vendored
|
@ -250,15 +250,7 @@ class KernelRelease(BaseRelease):
|
|||
|
||||
print()
|
||||
|
||||
def updateVersionMacros(self, version_str):
|
||||
info('Updating version macros in task.h for "%s"' % version_str)
|
||||
|
||||
# Extract major / minor / build from the version string.
|
||||
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)
|
||||
|
||||
self.commitChanges(self.commit_msg_prefix + 'Bump task.h version macros to "%s"' % version_str)
|
||||
|
||||
def createReleaseZip(self):
|
||||
'''
|
||||
|
@ -334,31 +326,6 @@ class KernelRelease(BaseRelease):
|
|||
def autoRelease(self):
|
||||
info('Auto-releasing FreeRTOS Kernel V%s' % self.version)
|
||||
|
||||
# Determine if we need to set a separate version macros for the main branch
|
||||
if (self.commit == 'HEAD') and len(self.main_br_version) > 0 and (self.main_br_version != self.version):
|
||||
# Update version macros for main branch
|
||||
self.updateVersionMacros(self.main_br_version)
|
||||
|
||||
# Push the branch
|
||||
self.pushLocalCommits()
|
||||
|
||||
# Revert the last commit in our working git repo
|
||||
self.local_repo.git.reset('--hard','HEAD^')
|
||||
|
||||
# Update the version macros
|
||||
self.updateVersionMacros(self.version)
|
||||
|
||||
if (self.commit == 'HEAD') and (self.main_br_version == self.version):
|
||||
# Share a task.h version number commit for main branch and release tag)
|
||||
self.pushLocalCommits()
|
||||
|
||||
# When baselining off a non-HEAD commit, main is left unchanged by tagging a detached HEAD,
|
||||
# applying the autocommits, tagging, and pushing the new tag data to remote.
|
||||
# However in the detached HEAD state we don't have a branch to push to, so we skip
|
||||
|
||||
# Update the header in each c/assembly file
|
||||
self.updateFileHeaderVersions(['FreeRTOS Kernel V','FreeRTOS Kernel <DEVELOPMENT BRANCH>'], 'FreeRTOS Kernel V%s' % self.version)
|
||||
|
||||
self.pushTag()
|
||||
|
||||
self.createGitRelease()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue