diff --git a/assets/js/components/Version.vue b/assets/js/components/Version.vue index 4d3ed861d..13c9f2d0a 100644 --- a/assets/js/components/Version.vue +++ b/assets/js/components/Version.vue @@ -156,7 +156,7 @@ export default { return ( this.available && // available version already computed? this.installed != "[[.Version]]" && // go template parsed? - this.installed != "0.0.1-alpha" && // make used? + this.installed != "0.0.0" && // make used? this.available != this.installed ); }, @@ -172,7 +172,9 @@ export default { } }, releaseNotesUrl: function (version) { - return `https://github.com/evcc-io/evcc/releases/tag/${version}`; + return version == "0.0.0" + ? `https://github.com/evcc-io/evcc/releases` + : `https://github.com/evcc-io/evcc/releases/tag/${version}`; }, openModal() { const modal = Modal.getOrCreateInstance(document.getElementById("updateModal")); diff --git a/cmd/root.go b/cmd/root.go index 4b78c976b..03f76d54f 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -259,9 +259,11 @@ func runRoot(cmd *cobra.Command, args []string) { site.DumpConfig() site.Prepare(valueChan, pushChan) - // show and check version - valueChan <- util.Param{Key: "version", Val: server.FormattedVersion()} - go updater.Run(log, httpd, valueChan) + // show and check version, reduce api load during development + if server.Version != server.DevVersion { + valueChan <- util.Param{Key: "version", Val: server.FormattedVersion()} + go updater.Run(log, httpd, valueChan) + } // expose sponsor to UI if sponsor.Subject != "" { diff --git a/server/version.go b/server/version.go index 6d97b1ffc..d10346780 100644 --- a/server/version.go +++ b/server/version.go @@ -2,9 +2,11 @@ package server import "fmt" +const DevVersion = "0.0.0" + var ( // Version of executable - Version = "0.0.1-alpha" + Version = DevVersion // Commit of executable Commit = ""