Adding offical build function
Этот коммит содержится в:
@@ -78,7 +78,7 @@ func main() {
|
|||||||
func diagnosticsJob() {
|
func diagnosticsJob() {
|
||||||
go func() {
|
go func() {
|
||||||
for {
|
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 {
|
if result := <-api.Srv.Store.System().Get(); result.Err == nil {
|
||||||
props := result.Data.(model.StringMap)
|
props := result.Data.(model.StringMap)
|
||||||
lastTime, _ := strconv.ParseInt(props["LastDiagnosticTime"], 10, 0)
|
lastTime, _ := strconv.ParseInt(props["LastDiagnosticTime"], 10, 0)
|
||||||
|
|||||||
@@ -67,6 +67,10 @@ func GetPreviousVersion(currentVersion string) (int64, int64) {
|
|||||||
return 0, 0
|
return 0, 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func IsOfficalBuild() bool {
|
||||||
|
return model.BuildNumber != "_BUILD_NUMBER_"
|
||||||
|
}
|
||||||
|
|
||||||
func IsCurrentVersion(versionToCheck string) bool {
|
func IsCurrentVersion(versionToCheck string) bool {
|
||||||
currentMajor, currentMinor, _ := SplitVersion(CurrentVersion)
|
currentMajor, currentMinor, _ := SplitVersion(CurrentVersion)
|
||||||
toCheckMajor, toCheckMinor, _ := SplitVersion(versionToCheck)
|
toCheckMajor, toCheckMinor, _ := SplitVersion(versionToCheck)
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func SendDiagnostic(data model.StringMap) *model.AppError {
|
func SendDiagnostic(data model.StringMap) *model.AppError {
|
||||||
if Cfg.PrivacySettings.EnableDiagnostic && model.BuildNumber != "_BUILD_NUMBER_" {
|
if Cfg.PrivacySettings.EnableDiagnostic && !model.IsOfficalBuild() {
|
||||||
|
|
||||||
query := "?"
|
query := "?"
|
||||||
for name, value := range data {
|
for name, value := range data {
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user