mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-13 09:16:14 +01:00
Merge pull request #1066 from dmach/fix-git-version-github
Fix detecting version from git in archives from GitHub
This commit is contained in:
commit
dba4041af0
@ -10,8 +10,9 @@ def get_git_archive_version():
|
||||
# the `version` variable contents get substituted during `git archive`
|
||||
# it requires adding this to .gitattributes: <path to this file> 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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user