used for forge protobuf tables
This commit is contained in:
parent
135346af6a
commit
3f1c8bf5c2
|
@ -87,6 +87,25 @@ func (repo *Repo) NewestAge() time.Duration {
|
|||
return time.Since(newest)
|
||||
}
|
||||
|
||||
func (repo *Repo) NewestTime() time.Time {
|
||||
alltags := repo.Tags.selectAllGitTags()
|
||||
|
||||
var newest time.Time
|
||||
|
||||
for _, tag := range alltags {
|
||||
// check the actual age of the patch
|
||||
if newest.Before(tag.Authordate.AsTime()) {
|
||||
newest = tag.Authordate.AsTime()
|
||||
}
|
||||
// check the age of the commit
|
||||
if newest.Before(tag.Creatordate.AsTime()) {
|
||||
newest = tag.Creatordate.AsTime()
|
||||
}
|
||||
}
|
||||
|
||||
return newest
|
||||
}
|
||||
|
||||
func (repo *Repo) NewestAgeVerbose() time.Duration {
|
||||
alltags := repo.Tags.selectAllGitTags()
|
||||
|
||||
|
|
Loading…
Reference in New Issue