[MM-48391] Store the server info in the export version line (#21709)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
7c6d487cf3
Коммит
6965585aa8
@@ -7,11 +7,13 @@ import (
|
||||
"archive/zip"
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
|
||||
@@ -157,9 +159,17 @@ func (a *App) exportWriteLine(w io.Writer, line *imports.LineImportData) *model.
|
||||
|
||||
func (a *App) exportVersion(writer io.Writer) *model.AppError {
|
||||
version := 1
|
||||
|
||||
info := &imports.VersionInfoImportData{
|
||||
Generator: "mattermost-server",
|
||||
Version: fmt.Sprintf("%s (%s, enterprise: %s)", model.CurrentVersion, model.BuildHash, model.BuildEnterpriseReady),
|
||||
Created: time.Now().Format(time.RFC3339Nano),
|
||||
}
|
||||
|
||||
versionLine := &imports.LineImportData{
|
||||
Type: "version",
|
||||
Version: &version,
|
||||
Info: info,
|
||||
}
|
||||
|
||||
return a.exportWriteLine(writer, versionLine)
|
||||
|
||||
Ссылка в новой задаче
Block a user