Skip to content
Snippets Groups Projects
Commit 575a9f25 authored by Amir MOHAMMADI's avatar Amir MOHAMMADI
Browse files

Change to next beta version correctly

parent 49249599
No related branches found
No related tags found
No related merge requests found
...@@ -269,7 +269,7 @@ def just_build_package(gitpkg, dry_run=False): ...@@ -269,7 +269,7 @@ def just_build_package(gitpkg, dry_run=False):
last_pipeline = get_last_nonskip_pipeline(gitpkg, before_last=True) last_pipeline = get_last_nonskip_pipeline(gitpkg, before_last=True)
# check that the chosen pipeline is the one we are looking for # check that the chosen pipeline is the one we are looking for
latest_tag_name = get_latest_tag_name(gitpkg) latest_tag_name = 'v' + get_latest_tag_name(gitpkg)
# the pipeline should be the one built for the latest tag, so check if it is the correct choice # the pipeline should be the one built for the latest tag, so check if it is the correct choice
if last_pipeline.ref != latest_tag_name: if last_pipeline.ref != latest_tag_name:
raise ValueError('While deploying {0}, found pipeline {1} but it does not match ' raise ValueError('While deploying {0}, found pipeline {1} but it does not match '
...@@ -374,7 +374,8 @@ def release_package(gitpkg, tag_name, tag_comments_list, dry_run=False): ...@@ -374,7 +374,8 @@ def release_package(gitpkg, tag_name, tag_comments_list, dry_run=False):
# 3. Replace branch tag in Readme to master, change version file to beta version tag. Git add, commit, and push. # 3. Replace branch tag in Readme to master, change version file to beta version tag. Git add, commit, and push.
readme_content = _update_readme(readme_content) readme_content = _update_readme(readme_content)
version_number += 'b0' major, minor, patch = version_number.split('.')
version_number = '{}.{}.{}b0'.format(major, minor, int(patch)+1)
# commit and push changes # commit and push changes
commit_files(gitpkg, {'README.rst': readme_content, 'version.txt': version_number}, commit_files(gitpkg, {'README.rst': readme_content, 'version.txt': version_number},
'Increased latest version to %s [skip ci]' % version_number, dry_run) 'Increased latest version to %s [skip ci]' % version_number, dry_run)
...@@ -382,7 +383,7 @@ def release_package(gitpkg, tag_name, tag_comments_list, dry_run=False): ...@@ -382,7 +383,7 @@ def release_package(gitpkg, tag_name, tag_comments_list, dry_run=False):
def parse_and_process_package_changelog(gl, bob_group, pkg_name, package_changelog, dry_run=False): def parse_and_process_package_changelog(gl, bob_group, pkg_name, package_changelog, dry_run=False):
""" """
Process the changelog of a single package. Parse the log following specific format. Process the changelog of a single package. Parse the log following specific format.
Update annotations of the provided older tags and release the package by following the last tag description. Update annotations of the provided older tags and release the package by following the last tag description.
Args: Args:
gl: Gitlab API object gl: Gitlab API object
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment