mirror of
https://github.com/rpm-software-management/tito.git
synced 2025-02-23 20:22:46 +00:00
Merge pull request #224 from xsuchy/release-number
better release number for untagged packages
This commit is contained in:
commit
a1d324c7a9
1 changed files with 9 additions and 0 deletions
|
@ -879,6 +879,15 @@ def get_commit_count(tag, commit_id):
|
|||
|
||||
if status != 0:
|
||||
debug("git describe of tag %s failed (%d)" % (tag, status))
|
||||
debug("going to use number of commits from initial commit")
|
||||
(status, output) = getstatusoutput(
|
||||
"git rev-list --max-parents=0 HEAD")
|
||||
if status == 0:
|
||||
# output is now inital commit
|
||||
(status, output) = getstatusoutput(
|
||||
"git rev-list %s..%s --count" % (output, commit_id))
|
||||
if status == 0:
|
||||
return output
|
||||
return 0
|
||||
|
||||
if tag != output:
|
||||
|
|
Loading…
Add table
Reference in a new issue