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,6 +9,7 @@ import (
9 9
 	"fmt"
10 10
 	"log"
11 11
 	"math/rand"
12
+	"strings"
12 13
 	"syscall"
13 14
 	"time"
14 15
 
@@ -124,6 +125,11 @@ Options:
124 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 133
 		server, err := irc.NewServer(configfile, config, logger)
128 134
 		if err != nil {
129 135
 			logger.Error("startup", fmt.Sprintf("Could not load server: %s", err.Error()))

Loading…
Cancel
Save