used for forge protobuf tables

This commit is contained in:
Jeff Carr 2025-02-21 09:14:01 -06:00
parent 135346af6a
commit 3f1c8bf5c2
1 changed files with 19 additions and 0 deletions

View File

@ -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()