From 21490faa9e267e6ae293e3f3a0758e14c2c4ad27 Mon Sep 17 00:00:00 2001 From: Harvey Tindall Date: Sun, 7 Mar 2021 16:45:35 +0000 Subject: [PATCH] fix IsNew() func, include LICENSE in goreleaser --- .goreleaser.yml | 1 + updater.go | 3 +-- views.go | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 1d3632d..3afd2c1 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -17,6 +17,7 @@ before: - cp node_modules/remixicon/fonts/remixicon.css node_modules/remixicon/fonts/remixicon.woff2 data/web/css/ - cp -r html data/ - cp -r lang data/ + - cp LICENSE data/ - python3 scripts/enumerate_config.py -i config/config-base.json -o data/config-base.json - python3 scripts/generate_ini.py -i config/config-base.json -o data/config-default.ini - python3 scripts/compile_mjml.py -o data/ diff --git a/updater.go b/updater.go index 2dd33bc..5b7aafd 100644 --- a/updater.go +++ b/updater.go @@ -124,7 +124,6 @@ type Updater struct { func newUpdater(buildroneURL, namespace, repo, version, commit, buildType string) *Updater { bType := off - fmt.Println("BT", buildType) tag := "" switch buildType { case "binary": @@ -202,7 +201,7 @@ func (ud *Updater) GetTag() (Tag, int, error) { } func (t *Tag) IsNew() bool { - return t.Version == version + return t.Version != version } func (ud *Updater) getRelease() (release GHRelease, status int, err error) { diff --git a/views.go b/views.go index 7d9521e..c65af86 100644 --- a/views.go +++ b/views.go @@ -72,6 +72,7 @@ func (app *appContext) AdminPage(gc *gin.Context) { var license string l, err := fs.ReadFile(localFS, "LICENSE") if err != nil { + app.debug.Printf("Failed to load LICENSE: %s", err) license = "" } license = string(l)