Browse Source

startup: Add warning about running unreleased versions

tags/v0.9.0
Daniel Oaks 7 years ago
parent
commit
3db81be7e3
1 changed files with 6 additions and 0 deletions
  1. 6
    0
      oragono.go

+ 6
- 0
oragono.go View File

9
 	"fmt"
9
 	"fmt"
10
 	"log"
10
 	"log"
11
 	"math/rand"
11
 	"math/rand"
12
+	"strings"
12
 	"syscall"
13
 	"syscall"
13
 	"time"
14
 	"time"
14
 
15
 
124
 			logger.Info("startup", fmt.Sprintf("StackImpact profiling started as %s", config.Debug.StackImpact.AppName))
125
 			logger.Info("startup", fmt.Sprintf("StackImpact profiling started as %s", config.Debug.StackImpact.AppName))
125
 		}
126
 		}
126
 
127
 
128
+		// warning if running a non-final version
129
+		if strings.Contains(irc.SemVer, "unreleased") {
130
+			logger.Warning("startup", "You are currently running an unreleased beta version of Oragono that may be unstable and could corrupt your database.\nIf you are running a production network, please download the latest build from https://oragono.io/downloads.html and run that instead.")
131
+		}
132
+
127
 		server, err := irc.NewServer(configfile, config, logger)
133
 		server, err := irc.NewServer(configfile, config, logger)
128
 		if err != nil {
134
 		if err != nil {
129
 			logger.Error("startup", fmt.Sprintf("Could not load server: %s", err.Error()))
135
 			logger.Error("startup", fmt.Sprintf("Could not load server: %s", err.Error()))

Loading…
Cancel
Save