Skip to content

Commit c5d50d3

Browse files
committed
update to latest calculate_version
1 parent 190d4c5 commit c5d50d3

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

scripts/calculate_version.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ def calculate_version(base_major=1, base_minor=0, base_revision=0, base_pre="alp
7171
"""Calculates a semver based on commit history and special flags in commit messages"""
7272
major = base_major
7373
minor = base_minor
74+
# NOSONAR
7475
patch = base_revision
7576
pre = base_pre
7677

@@ -82,12 +83,12 @@ def calculate_version(base_major=1, base_minor=0, base_revision=0, base_pre="alp
8283
if status_sets:
8384
most_recent_message = status_sets[0].message.strip()
8485

85-
if most_recent_message.startswith("+setstatus "):
86+
if "+setstatus " in most_recent_message:
8687
pre = most_recent_message.split(" ")[
8788
1
8889
] # Take the first string after the command
8990

90-
if most_recent_message == "+clearstatus":
91+
if "+clearstatus" in most_recent_message:
9192
pre = None
9293

9394
# If there are any +major in commit messages, increment the counter

0 commit comments

Comments
 (0)