diff --git a/osc/util/git_version.py b/osc/util/git_version.py index 6caa0eca..385dc52b 100644 --- a/osc/util/git_version.py +++ b/osc/util/git_version.py @@ -72,8 +72,10 @@ def get_version(version): # removing "~" because it is not an allowed character in git tags # and also because the normalized form is (for example) 1.0.0b0 if version and git_tag != version.replace("~", ""): - msg = f"Git tag '{git_tag}' doesn't correspond with version '{version}' specified in the source code" - raise ValueError(msg) + # Git tag doesn't correspond with version specified in the source code. + # The most common reason is that forks do not have their tags in sync with upstream. + # In that case just return the version specified in the source code. + return version result = git_tag if git_hash: