Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't add git hash to version if minor==0 #409

Merged
merged 1 commit into from
Apr 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions version.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def parse_git_version(version):
next = parts.pop(0)
if next == 'm':
dirty = True
else:
elif minor != '0':
git = next[1:]

# Check: dirty.
Expand All @@ -53,10 +53,10 @@ def parse_git_version(version):

# Some inline tests to check Git version parsing:
assert parse_git_version(
'wasi-sdk-21-0-g317548590b40+m') == ('21', '0', '317548590b40', True)
'wasi-sdk-21-1-g317548590b40+m') == ('21', '1', '317548590b40', True)
assert parse_git_version('wasi-sdk-21-2+m') == ('21', '2', None, True)
assert parse_git_version(
'wasi-sdk-23-0-g317548590b40') == ('23', '0', '317548590b40', False)
'wasi-sdk-23-0-g317548590b40') == ('23', '0', None, False)


def git_version():
Expand Down
Loading