diff options
Diffstat (limited to 'doPull.go')
| -rw-r--r-- | doPull.go | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -17,7 +17,7 @@ func needToUpdateRepo(repo *gitpb.Repo) (*gitpb.Repo, error) { if repo.Tags == nil { return nil, nil } - if repo.Tags.Master == nil { + if repo.MasterStat == nil { return nil, nil } found := me.forge.Repos.FindByNamespace(repo.Namespace) @@ -27,12 +27,12 @@ func needToUpdateRepo(repo *gitpb.Repo) (*gitpb.Repo, error) { if found.Tags == nil { return nil, nil } - if found.Tags.Master == nil { + if found.MasterStat == nil { return nil, nil } - newtime := repo.Tags.Master.Creatordate.AsTime() - ourtime := found.Tags.Master.Creatordate.AsTime() + newtime := repo.MasterStat.CommitTime.AsTime() + ourtime := found.MasterStat.CommitTime.AsTime() dur := newtime.Sub(ourtime) if dur < time.Minute { @@ -41,7 +41,7 @@ func needToUpdateRepo(repo *gitpb.Repo) (*gitpb.Repo, error) { log.Infof("checking for updates %s %s\n", cobol.FormatDuration(dur), found.Namespace) /* dur := time.Since(repo.Tags.Master.Authordate.AsTime()) - when := repo.Tags.Master.Creatordate.AsTime() + when := repo.Tags.Master.CommitTime.AsTime() dur = time.Since(when) log.Infof("stuff %s age=%s %v\n", repo.Namespace, cobol.FormatDuration(dur), when) */ @@ -130,14 +130,14 @@ func doPull() (string, error) { } -func findGitTag(repo *gitpb.Repo, hash string) *gitpb.GitTag { - for _, tag := range repo.Tags.GitTags { +func findGitTag(repo *gitpb.Repo, hash string) *gitpb.Stat { + for _, tag := range repo.Tags.Stats { if tag.Hash == hash { return tag } // log.Info(i, tag.Hash, tag.Refname, tag) } - for i, tag := range repo.Tags.GitTags { + for i, tag := range repo.Tags.Stats { log.Info(hash, i, tag) } okExit("") |
