Beispiel #1
0
def evaluate_version_bump(current_version, force=None):
    if force:
        return force
    bump = None

    changes = []

    for commit_message in get_commit_log():
        if current_version in commit_message:
            break
        if load_config()['major_tag'] in commit_message:
            changes.append(3)
        elif load_config()['minor_tag'] in commit_message:
            changes.append(2)
        elif load_config()['patch_tag'] in commit_message:
            changes.append(1)

    if len(changes):
        bump = LEVELS[max(changes)]
    return bump
 def test_first_commit_is_not_initial_commit(self):
     self.assertNotEqual(next(get_commit_log()), 'Initial commit')