From 084a62e60f8eba286d713bb2904279d2ad050589 Mon Sep 17 00:00:00 2001 From: Harvey Tindall Date: Fri, 8 Sep 2023 19:00:19 +0100 Subject: [PATCH] updater: account for build/publish time diff --- updater.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/updater.go b/updater.go index f8a67e9..c6c8c62 100644 --- a/updater.go +++ b/updater.go @@ -213,7 +213,8 @@ func (ud *Updater) GetTag() (Tag, int, error) { func (t *Tag) IsNew() bool { // fmt.Printf("Build Time: %+v, Release Date: %+v", buildTime, t.ReleaseDate) - return t.Version[:7] != commit && t.Ready && t.ReleaseDate.After(buildTime) + // Add 20 minutes to account for build time + return t.Version[:7] != commit && t.Ready && t.ReleaseDate.After(buildTime.Add(time.Duration(20)*time.Minute)) } func (ud *Updater) getRelease() (release GHRelease, status int, err error) {