mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Adding offical build function
This commit is contained in:
@@ -78,7 +78,7 @@ func main() {
|
||||
func diagnosticsJob() {
|
||||
go func() {
|
||||
for {
|
||||
if utils.Cfg.PrivacySettings.EnableDiagnostic && model.BuildNumber != "_BUILD_NUMBER_" {
|
||||
if utils.Cfg.PrivacySettings.EnableDiagnostic && !model.IsOfficalBuild() {
|
||||
if result := <-api.Srv.Store.System().Get(); result.Err == nil {
|
||||
props := result.Data.(model.StringMap)
|
||||
lastTime, _ := strconv.ParseInt(props["LastDiagnosticTime"], 10, 0)
|
||||
|
||||
@@ -67,6 +67,10 @@ func GetPreviousVersion(currentVersion string) (int64, int64) {
|
||||
return 0, 0
|
||||
}
|
||||
|
||||
func IsOfficalBuild() bool {
|
||||
return model.BuildNumber != "_BUILD_NUMBER_"
|
||||
}
|
||||
|
||||
func IsCurrentVersion(versionToCheck string) bool {
|
||||
currentMajor, currentMinor, _ := SplitVersion(CurrentVersion)
|
||||
toCheckMajor, toCheckMinor, _ := SplitVersion(versionToCheck)
|
||||
|
||||
@@ -22,7 +22,7 @@ const (
|
||||
)
|
||||
|
||||
func SendDiagnostic(data model.StringMap) *model.AppError {
|
||||
if Cfg.PrivacySettings.EnableDiagnostic && model.BuildNumber != "_BUILD_NUMBER_" {
|
||||
if Cfg.PrivacySettings.EnableDiagnostic && !model.IsOfficalBuild() {
|
||||
|
||||
query := "?"
|
||||
for name, value := range data {
|
||||
|
||||
Reference in New Issue
Block a user