From 575a9f2515b1e00fe193114cea06b3ef553b1575 Mon Sep 17 00:00:00 2001 From: Amir MOHAMMADI <amir.mohammadi@idiap.ch> Date: Tue, 10 Apr 2018 12:37:57 +0200 Subject: [PATCH] Change to next beta version correctly --- release/release_bob.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/release/release_bob.py b/release/release_bob.py index c41d3d5..3c8fd41 100755 --- a/release/release_bob.py +++ b/release/release_bob.py @@ -269,7 +269,7 @@ def just_build_package(gitpkg, dry_run=False): last_pipeline = get_last_nonskip_pipeline(gitpkg, before_last=True) # 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 if last_pipeline.ref != latest_tag_name: 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): # 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) - version_number += 'b0' + major, minor, patch = version_number.split('.') + version_number = '{}.{}.{}b0'.format(major, minor, int(patch)+1) # commit and push changes commit_files(gitpkg, {'README.rst': readme_content, 'version.txt': version_number}, '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): 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. Args: gl: Gitlab API object -- GitLab