1
0
mirror of https://github.com/hrfee/jfa-go.git synced 2024-12-22 17:10:10 +00:00

updater: account for build/publish time diff

This commit is contained in:
Harvey Tindall 2023-09-08 19:00:19 +01:00
parent 655dc88c62
commit 084a62e60f
Signed by: hrfee
GPG Key ID: BBC65952848FB1A2

View File

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