Fix for independent projects

Independent projects do not have "stable" branches, so the
new_release script will fail.
Set version to master and change it accordingly only if it's not
and independent project.

Change-Id: I9ba7f251d64e2bfca5c262acf9b20dc3da23fc87
This commit is contained in:
Riccardo Pittau 2023-03-03 16:48:11 +01:00
parent 096db02daf
commit bb2d6399cd

View File

@ -464,10 +464,12 @@ def main():
gitutils.clone_repo(workdir, repo)
branches = gitutils.get_branches(workdir, repo)
version = 'origin/stable/%s' % get_stable_branch_id(series)
if not any(branch for branch in branches
if branch.endswith(version)):
version = 'master'
version = 'master'
if series != '_independent':
version = 'origin/stable/%s' % get_stable_branch_id(series)
if not any(branch for branch in branches
if branch.endswith(version)):
version = 'master'
sha = gitutils.sha_for_tag(workdir, repo, version)