diff --git a/osc/util/git_version.py b/osc/util/git_version.py index 92fc6948..5050939f 100644 --- a/osc/util/git_version.py +++ b/osc/util/git_version.py @@ -10,8 +10,9 @@ def get_git_archive_version(): # the `version` variable contents get substituted during `git archive` # it requires adding this to .gitattributes: export-subst version = "$Format:%(describe:tags=true)$" - if version.startswith("$"): - # version hasn't been substituted during `git archive` + if version.startswith(("$", "%")): + # "$": version hasn't been substituted during `git archive` + # "%": "Format:" and "$" characters get removed from the version string (a GitHub bug?) return None return version