Check new version only for releases (#8107)
This commit is contained in:
parent
f08dea2c47
commit
543d5b781a
3 changed files with 12 additions and 6 deletions
|
|
@ -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"));
|
||||
|
|
|
|||
|
|
@ -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 != "" {
|
||||
|
|
|
|||
|
|
@ -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 = ""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue