Check new version only for releases (#8107)

This commit is contained in:
andig 2023-05-20 17:14:59 +02:00 • committed by GitHub
parent f08dea2c47
commit 543d5b781a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 6 deletions

View file

@ -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 != "" {