Making changes to versioning
Этот коммит содержится в:
1
.gitignore
поставляемый
1
.gitignore
поставляемый
@@ -9,7 +9,6 @@ bundle*.js
|
|||||||
model/version.go
|
model/version.go
|
||||||
model/version.go.bak
|
model/version.go.bak
|
||||||
|
|
||||||
|
|
||||||
# Compiled Object files, Static and Dynamic libs (Shared Objects)
|
# Compiled Object files, Static and Dynamic libs (Shared Objects)
|
||||||
*.o
|
*.o
|
||||||
*.a
|
*.a
|
||||||
|
|||||||
3
Makefile
3
Makefile
@@ -4,6 +4,7 @@ GOPATH ?= $(GOPATH:)
|
|||||||
GOFLAGS ?= $(GOFLAGS:)
|
GOFLAGS ?= $(GOFLAGS:)
|
||||||
BUILD_NUMBER ?= $(BUILD_NUMBER:)
|
BUILD_NUMBER ?= $(BUILD_NUMBER:)
|
||||||
BUILD_DATE = $(shell date -u)
|
BUILD_DATE = $(shell date -u)
|
||||||
|
BUILD_HASH = $(shell git rev-parse HEAD)
|
||||||
|
|
||||||
GO=$(GOPATH)/bin/godep go
|
GO=$(GOPATH)/bin/godep go
|
||||||
ESLINT=node_modules/eslint/bin/eslint.js
|
ESLINT=node_modules/eslint/bin/eslint.js
|
||||||
@@ -52,6 +53,7 @@ travis:
|
|||||||
|
|
||||||
@sed -i'.bak' 's|_BUILD_NUMBER_|$(BUILD_NUMBER)|g' ./model/version.go
|
@sed -i'.bak' 's|_BUILD_NUMBER_|$(BUILD_NUMBER)|g' ./model/version.go
|
||||||
@sed -i'.bak' 's|_BUILD_DATE_|$(BUILD_DATE)|g' ./model/version.go
|
@sed -i'.bak' 's|_BUILD_DATE_|$(BUILD_DATE)|g' ./model/version.go
|
||||||
|
@sed -i'.bak' 's|_BUILD_HASH_|$(BUILD_HASH)|g' ./model/version.go
|
||||||
|
|
||||||
@$(GO) build $(GOFLAGS) ./...
|
@$(GO) build $(GOFLAGS) ./...
|
||||||
@$(GO) install $(GOFLAGS) ./...
|
@$(GO) install $(GOFLAGS) ./...
|
||||||
@@ -228,6 +230,7 @@ dist: install
|
|||||||
|
|
||||||
@sed -i'.bak' 's|_BUILD_NUMBER_|$(BUILD_NUMBER)|g' ./model/version.go
|
@sed -i'.bak' 's|_BUILD_NUMBER_|$(BUILD_NUMBER)|g' ./model/version.go
|
||||||
@sed -i'.bak' 's|_BUILD_DATE_|$(BUILD_DATE)|g' ./model/version.go
|
@sed -i'.bak' 's|_BUILD_DATE_|$(BUILD_DATE)|g' ./model/version.go
|
||||||
|
@sed -i'.bak' 's|_BUILD_HASH_|$(BUILD_HASH)|g' ./model/version.go
|
||||||
|
|
||||||
@$(GO) build $(GOFLAGS) -i ./...
|
@$(GO) build $(GOFLAGS) -i ./...
|
||||||
@$(GO) install $(GOFLAGS) ./...
|
@$(GO) install $(GOFLAGS) ./...
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ func (h handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|||||||
c.setSiteURL(protocol + "://" + r.Host)
|
c.setSiteURL(protocol + "://" + r.Host)
|
||||||
|
|
||||||
w.Header().Set(model.HEADER_REQUEST_ID, c.RequestId)
|
w.Header().Set(model.HEADER_REQUEST_ID, c.RequestId)
|
||||||
w.Header().Set(model.HEADER_VERSION_ID, fmt.Sprintf("%v.%v", model.GetFullVersion(), utils.CfgLastModified))
|
w.Header().Set(model.HEADER_VERSION_ID, fmt.Sprintf("%v.%v", model.CurrentVersion, utils.CfgLastModified))
|
||||||
|
|
||||||
// Instruct the browser not to display us in an iframe for anti-clickjacking
|
// Instruct the browser not to display us in an iframe for anti-clickjacking
|
||||||
if !h.isApi {
|
if !h.isApi {
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pwd, _ := os.Getwd()
|
pwd, _ := os.Getwd()
|
||||||
l4g.Info("Current version is %v (%v/%v)", model.GetFullVersion(), model.BUILD_NUMBER, model.BUILD_DATE)
|
l4g.Info("Current version is %v (%v/%v/%v)", model.CurrentVersion, model.BuildNumber, model.BuildDate, model.BuildHash)
|
||||||
l4g.Info("Current working directory is %v", pwd)
|
l4g.Info("Current working directory is %v", pwd)
|
||||||
l4g.Info("Loaded config file from %v", utils.FindConfigFile(flagConfigFile))
|
l4g.Info("Loaded config file from %v", utils.FindConfigFile(flagConfigFile))
|
||||||
|
|
||||||
@@ -190,9 +190,10 @@ func cmdCreateUser() {
|
|||||||
|
|
||||||
func cmdVersion() {
|
func cmdVersion() {
|
||||||
if flagCmdVersion {
|
if flagCmdVersion {
|
||||||
fmt.Fprintln(os.Stderr, "Version: "+model.GetFullVersion())
|
fmt.Fprintln(os.Stderr, "Version: "+model.CurrentVersion)
|
||||||
fmt.Fprintln(os.Stderr, "Build Number: "+model.BUILD_NUMBER)
|
fmt.Fprintln(os.Stderr, "Build Number: "+model.BuildNumber)
|
||||||
fmt.Fprintln(os.Stderr, "Build Date: "+model.BUILD_DATE)
|
fmt.Fprintln(os.Stderr, "Build Date: "+model.BuildDate)
|
||||||
|
fmt.Fprintln(os.Stderr, "Build Hash: "+model.BuildHash)
|
||||||
|
|
||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -230,7 +230,7 @@ func IsValidAlphaNum(s string, allowUnderscores bool) bool {
|
|||||||
|
|
||||||
func Etag(parts ...interface{}) string {
|
func Etag(parts ...interface{}) string {
|
||||||
|
|
||||||
etag := GetFullVersion()
|
etag := CurrentVersion
|
||||||
|
|
||||||
for _, part := range parts {
|
for _, part := range parts {
|
||||||
etag += fmt.Sprintf(".%v", part)
|
etag += fmt.Sprintf(".%v", part)
|
||||||
|
|||||||
@@ -4,23 +4,26 @@
|
|||||||
package model
|
package model
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
// This is a list of all the current viersions including any patches.
|
||||||
VERSION_MAJOR = 0
|
// It should be maitained in chronological order with most current
|
||||||
VERSION_MINOR = 8
|
// release at the front of the list.
|
||||||
VERSION_PATCH = 0
|
var versions = []string{
|
||||||
BUILD_NUMBER = "_BUILD_NUMBER_"
|
"0.8.0",
|
||||||
BUILD_DATE = "_BUILD_DATE_"
|
"0.7.1",
|
||||||
)
|
"0.7.0",
|
||||||
|
"0.6.0",
|
||||||
func GetFullVersion() string {
|
"0.5.0",
|
||||||
return fmt.Sprintf("%v.%v.%v", VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var CurrentVersion string = versions[0]
|
||||||
|
var BuildNumber = "developer"
|
||||||
|
var BuildDate = "unknown"
|
||||||
|
var BuildHash = "unknown"
|
||||||
|
|
||||||
func SplitVersion(version string) (int64, int64, int64) {
|
func SplitVersion(version string) (int64, int64, int64) {
|
||||||
parts := strings.Split(version, ".")
|
parts := strings.Split(version, ".")
|
||||||
|
|
||||||
@@ -43,32 +46,41 @@ func SplitVersion(version string) (int64, int64, int64) {
|
|||||||
return major, minor, patch
|
return major, minor, patch
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetPreviousVersion(version string) (int64, int64) {
|
func GetPreviousVersion(currentVersion string) (int64, int64) {
|
||||||
major, minor, _ := SplitVersion(version)
|
currentIndex := -1
|
||||||
|
currentMajor, currentMinor, _ := SplitVersion(currentVersion)
|
||||||
|
|
||||||
if minor == 0 {
|
for index, version := range versions {
|
||||||
major = major - 1
|
major, minor, _ := SplitVersion(version)
|
||||||
minor = 9
|
|
||||||
} else {
|
if currentMajor == major && currentMinor == minor {
|
||||||
minor = minor - 1
|
currentIndex = index
|
||||||
|
}
|
||||||
|
|
||||||
|
if currentIndex >= 0 {
|
||||||
|
if currentMajor != major || currentMinor != minor {
|
||||||
|
return major, minor
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return major, minor
|
return 0, 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func IsCurrentVersion(versionToCheck string) bool {
|
func IsCurrentVersion(versionToCheck string) bool {
|
||||||
|
currentMajor, currentMinor, _ := SplitVersion(CurrentVersion)
|
||||||
toCheckMajor, toCheckMinor, _ := SplitVersion(versionToCheck)
|
toCheckMajor, toCheckMinor, _ := SplitVersion(versionToCheck)
|
||||||
|
|
||||||
if toCheckMajor == VERSION_MAJOR && toCheckMinor == VERSION_MINOR {
|
if toCheckMajor == currentMajor && toCheckMinor == currentMinor {
|
||||||
return true
|
return true
|
||||||
} else {
|
} else {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func IsLastVersion(versionToCheck string) bool {
|
func IsPreviousVersion(versionToCheck string) bool {
|
||||||
toCheckMajor, toCheckMinor, _ := SplitVersion(versionToCheck)
|
toCheckMajor, toCheckMinor, _ := SplitVersion(versionToCheck)
|
||||||
prevMajor, prevMinor := GetPreviousVersion(GetFullVersion())
|
prevMajor, prevMinor := GetPreviousVersion(CurrentVersion)
|
||||||
|
|
||||||
if toCheckMajor == prevMajor && toCheckMinor == prevMinor {
|
if toCheckMajor == prevMajor && toCheckMinor == prevMinor {
|
||||||
return true
|
return true
|
||||||
|
|||||||
@@ -8,9 +8,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestVersion(t *testing.T) {
|
func TestSplitVersion(t *testing.T) {
|
||||||
GetFullVersion()
|
|
||||||
|
|
||||||
major1, minor1, patch1 := SplitVersion("junk")
|
major1, minor1, patch1 := SplitVersion("junk")
|
||||||
if major1 != 0 || minor1 != 0 || patch1 != 0 {
|
if major1 != 0 || minor1 != 0 || patch1 != 0 {
|
||||||
t.Fatal()
|
t.Fatal()
|
||||||
@@ -35,38 +33,42 @@ func TestVersion(t *testing.T) {
|
|||||||
if major5 != 1 || minor5 != 2 || patch5 != 3 {
|
if major5 != 1 || minor5 != 2 || patch5 != 3 {
|
||||||
t.Fatal()
|
t.Fatal()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if IsLastVersion(GetFullVersion()) {
|
func TestGetPreviousVersion(t *testing.T) {
|
||||||
|
if major, minor := GetPreviousVersion("0.8.0"); major != 0 || minor != 7 {
|
||||||
|
t.Fatal(major, minor)
|
||||||
|
}
|
||||||
|
|
||||||
|
if major, minor := GetPreviousVersion("0.7.0"); major != 0 || minor != 6 {
|
||||||
|
t.Fatal(major, minor)
|
||||||
|
}
|
||||||
|
|
||||||
|
if major, minor := GetPreviousVersion("0.7.1"); major != 0 || minor != 6 {
|
||||||
|
t.Fatal(major, minor)
|
||||||
|
}
|
||||||
|
|
||||||
|
if major, minor := GetPreviousVersion("0.7111.1"); major != 0 || minor != 0 {
|
||||||
|
t.Fatal(major, minor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestIsCurrentVersion(t *testing.T) {
|
||||||
|
major, minor, patch := SplitVersion(CurrentVersion)
|
||||||
|
|
||||||
|
if !IsCurrentVersion(CurrentVersion) {
|
||||||
t.Fatal()
|
t.Fatal()
|
||||||
}
|
}
|
||||||
|
|
||||||
if !IsLastVersion(fmt.Sprintf("%v.%v.%v", VERSION_MAJOR, VERSION_MINOR-1, VERSION_PATCH)) {
|
if !IsCurrentVersion(fmt.Sprintf("%v.%v.%v", major, minor, patch+100)) {
|
||||||
t.Fatal()
|
t.Fatal()
|
||||||
}
|
}
|
||||||
|
|
||||||
// pacth should not affect current version check
|
if IsCurrentVersion(fmt.Sprintf("%v.%v.%v", major, minor+1, patch)) {
|
||||||
if !IsLastVersion(fmt.Sprintf("%v.%v.%v", VERSION_MAJOR, VERSION_MINOR-1, VERSION_PATCH+1)) {
|
|
||||||
t.Fatal()
|
t.Fatal()
|
||||||
}
|
}
|
||||||
|
|
||||||
if IsLastVersion(fmt.Sprintf("%v.%v.%v", VERSION_MAJOR, VERSION_MINOR+1, VERSION_PATCH)) {
|
if IsCurrentVersion(fmt.Sprintf("%v.%v.%v", major+1, minor, patch)) {
|
||||||
t.Fatal()
|
|
||||||
}
|
|
||||||
|
|
||||||
if !IsCurrentVersion(fmt.Sprintf("%v.%v.%v", VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH)) {
|
|
||||||
t.Fatal()
|
|
||||||
}
|
|
||||||
|
|
||||||
// pacth should not affect current version check
|
|
||||||
if !IsCurrentVersion(fmt.Sprintf("%v.%v.%v", VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH+1)) {
|
|
||||||
t.Fatal()
|
|
||||||
}
|
|
||||||
|
|
||||||
if IsCurrentVersion(fmt.Sprintf("%v.%v.%v", VERSION_MAJOR, VERSION_MINOR+1, VERSION_PATCH)) {
|
|
||||||
t.Fatal()
|
|
||||||
}
|
|
||||||
|
|
||||||
if IsCurrentVersion(fmt.Sprintf("%v.%v.%v", VERSION_MAJOR+1, VERSION_MINOR, VERSION_PATCH)) {
|
|
||||||
t.Fatal()
|
t.Fatal()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -196,9 +196,9 @@ func (s SqlPostStore) GetEtag(channelId string) StoreChannel {
|
|||||||
var et etagPosts
|
var et etagPosts
|
||||||
err := s.GetReplica().SelectOne(&et, "SELECT Id, UpdateAt FROM Posts WHERE ChannelId = :ChannelId ORDER BY UpdateAt DESC LIMIT 1", map[string]interface{}{"ChannelId": channelId})
|
err := s.GetReplica().SelectOne(&et, "SELECT Id, UpdateAt FROM Posts WHERE ChannelId = :ChannelId ORDER BY UpdateAt DESC LIMIT 1", map[string]interface{}{"ChannelId": channelId})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
result.Data = fmt.Sprintf("%v.0.%v", model.GetFullVersion(), model.GetMillis())
|
result.Data = fmt.Sprintf("%v.0.%v", model.CurrentVersion, model.GetMillis())
|
||||||
} else {
|
} else {
|
||||||
result.Data = fmt.Sprintf("%v.%v.%v", model.GetFullVersion(), et.Id, et.UpdateAt)
|
result.Data = fmt.Sprintf("%v.%v.%v", model.CurrentVersion, et.Id, et.UpdateAt)
|
||||||
}
|
}
|
||||||
|
|
||||||
storeChannel <- result
|
storeChannel <- result
|
||||||
|
|||||||
@@ -37,14 +37,14 @@ func TestPostStoreGet(t *testing.T) {
|
|||||||
o1.Message = "a" + model.NewId() + "b"
|
o1.Message = "a" + model.NewId() + "b"
|
||||||
|
|
||||||
etag1 := (<-store.Post().GetEtag(o1.ChannelId)).Data.(string)
|
etag1 := (<-store.Post().GetEtag(o1.ChannelId)).Data.(string)
|
||||||
if strings.Index(etag1, model.GetFullVersion()+".0.") != 0 {
|
if strings.Index(etag1, model.CurrentVersion+".0.") != 0 {
|
||||||
t.Fatal("Invalid Etag")
|
t.Fatal("Invalid Etag")
|
||||||
}
|
}
|
||||||
|
|
||||||
o1 = (<-store.Post().Save(o1)).Data.(*model.Post)
|
o1 = (<-store.Post().Save(o1)).Data.(*model.Post)
|
||||||
|
|
||||||
etag2 := (<-store.Post().GetEtag(o1.ChannelId)).Data.(string)
|
etag2 := (<-store.Post().GetEtag(o1.ChannelId)).Data.(string)
|
||||||
if strings.Index(etag2, model.GetFullVersion()+"."+o1.Id) != 0 {
|
if strings.Index(etag2, model.CurrentVersion+"."+o1.Id) != 0 {
|
||||||
t.Fatal("Invalid Etag")
|
t.Fatal("Invalid Etag")
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -136,7 +136,7 @@ func TestPostStoreDelete(t *testing.T) {
|
|||||||
o1.Message = "a" + model.NewId() + "b"
|
o1.Message = "a" + model.NewId() + "b"
|
||||||
|
|
||||||
etag1 := (<-store.Post().GetEtag(o1.ChannelId)).Data.(string)
|
etag1 := (<-store.Post().GetEtag(o1.ChannelId)).Data.(string)
|
||||||
if strings.Index(etag1, model.GetFullVersion()+".0.") != 0 {
|
if strings.Index(etag1, model.CurrentVersion+".0.") != 0 {
|
||||||
t.Fatal("Invalid Etag")
|
t.Fatal("Invalid Etag")
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -160,7 +160,7 @@ func TestPostStoreDelete(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
etag2 := (<-store.Post().GetEtag(o1.ChannelId)).Data.(string)
|
etag2 := (<-store.Post().GetEtag(o1.ChannelId)).Data.(string)
|
||||||
if strings.Index(etag2, model.GetFullVersion()+"."+o1.Id) != 0 {
|
if strings.Index(etag2, model.CurrentVersion+"."+o1.Id) != 0 {
|
||||||
t.Fatal("Invalid Etag")
|
t.Fatal("Invalid Etag")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,9 +64,9 @@ func NewSqlStore() Store {
|
|||||||
// Check to see if it's the most current database schema version
|
// Check to see if it's the most current database schema version
|
||||||
if !model.IsCurrentVersion(schemaVersion) {
|
if !model.IsCurrentVersion(schemaVersion) {
|
||||||
// If we are upgrading from the previous version then print a warning and continue
|
// If we are upgrading from the previous version then print a warning and continue
|
||||||
if model.IsLastVersion(schemaVersion) {
|
if model.IsPreviousVersion(schemaVersion) {
|
||||||
l4g.Warn("The database schema version of " + schemaVersion + " appears to be out of date")
|
l4g.Warn("The database schema version of " + schemaVersion + " appears to be out of date")
|
||||||
l4g.Warn("Attempting to upgrade the database schema version to " + model.GetFullVersion())
|
l4g.Warn("Attempting to upgrade the database schema version to " + model.CurrentVersion)
|
||||||
} else {
|
} else {
|
||||||
// If this is an 'upgrade needed' state but the user is attempting to skip a version then halt the world
|
// If this is an 'upgrade needed' state but the user is attempting to skip a version then halt the world
|
||||||
l4g.Critical("The database schema version of " + schemaVersion + " cannot be upgraded. You must not skip a version.")
|
l4g.Critical("The database schema version of " + schemaVersion + " cannot be upgraded. You must not skip a version.")
|
||||||
@@ -112,14 +112,14 @@ func NewSqlStore() Store {
|
|||||||
sqlStore.oauth.(*SqlOAuthStore).CreateIndexesIfNotExists()
|
sqlStore.oauth.(*SqlOAuthStore).CreateIndexesIfNotExists()
|
||||||
sqlStore.system.(*SqlSystemStore).CreateIndexesIfNotExists()
|
sqlStore.system.(*SqlSystemStore).CreateIndexesIfNotExists()
|
||||||
|
|
||||||
if model.IsLastVersion(schemaVersion) {
|
if model.IsPreviousVersion(schemaVersion) {
|
||||||
sqlStore.system.Update(&model.System{Name: "Version", Value: model.GetFullVersion()})
|
sqlStore.system.Update(&model.System{Name: "Version", Value: model.CurrentVersion})
|
||||||
l4g.Warn("The database schema has been upgraded to version " + model.GetFullVersion())
|
l4g.Warn("The database schema has been upgraded to version " + model.CurrentVersion)
|
||||||
}
|
}
|
||||||
|
|
||||||
if schemaVersion == "" {
|
if schemaVersion == "" {
|
||||||
sqlStore.system.Save(&model.System{Name: "Version", Value: model.GetFullVersion()})
|
sqlStore.system.Save(&model.System{Name: "Version", Value: model.CurrentVersion})
|
||||||
l4g.Info("The database schema has been set to version " + model.GetFullVersion())
|
l4g.Info("The database schema has been set to version " + model.CurrentVersion)
|
||||||
}
|
}
|
||||||
|
|
||||||
return sqlStore
|
return sqlStore
|
||||||
|
|||||||
@@ -325,9 +325,9 @@ func (s SqlUserStore) GetEtagForProfiles(teamId string) StoreChannel {
|
|||||||
|
|
||||||
updateAt, err := s.GetReplica().SelectInt("SELECT UpdateAt FROM Users WHERE TeamId = :TeamId ORDER BY UpdateAt DESC LIMIT 1", map[string]interface{}{"TeamId": teamId})
|
updateAt, err := s.GetReplica().SelectInt("SELECT UpdateAt FROM Users WHERE TeamId = :TeamId ORDER BY UpdateAt DESC LIMIT 1", map[string]interface{}{"TeamId": teamId})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
result.Data = fmt.Sprintf("%v.%v", model.GetFullVersion(), model.GetMillis())
|
result.Data = fmt.Sprintf("%v.%v", model.CurrentVersion, model.GetMillis())
|
||||||
} else {
|
} else {
|
||||||
result.Data = fmt.Sprintf("%v.%v", model.GetFullVersion(), updateAt)
|
result.Data = fmt.Sprintf("%v.%v", model.CurrentVersion, updateAt)
|
||||||
}
|
}
|
||||||
|
|
||||||
storeChannel <- result
|
storeChannel <- result
|
||||||
|
|||||||
@@ -276,9 +276,10 @@ func getSanitizeOptions(c *Config) map[string]bool {
|
|||||||
func getClientProperties(c *Config) map[string]string {
|
func getClientProperties(c *Config) map[string]string {
|
||||||
props := make(map[string]string)
|
props := make(map[string]string)
|
||||||
|
|
||||||
props["Version"] = model.GetFullVersion()
|
props["Version"] = model.CurrentVersion
|
||||||
props["BuildNumber"] = model.BUILD_NUMBER
|
props["BuildNumber"] = model.BuildNumber
|
||||||
props["BuildDate"] = model.BUILD_DATE
|
props["BuildDate"] = model.BuildDate
|
||||||
|
props["BuildHash"] = model.BuildHash
|
||||||
|
|
||||||
props["SiteName"] = c.ServiceSettings.SiteName
|
props["SiteName"] = c.ServiceSettings.SiteName
|
||||||
props["ByPassEmail"] = strconv.FormatBool(c.EmailSettings.ByPassEmail)
|
props["ByPassEmail"] = strconv.FormatBool(c.EmailSettings.ByPassEmail)
|
||||||
|
|||||||
@@ -83,11 +83,10 @@ export default class DeveloperTab extends React.Component {
|
|||||||
>
|
>
|
||||||
<li className='col-sm-10 section-title'>{'Version'}</li>
|
<li className='col-sm-10 section-title'>{'Version'}</li>
|
||||||
<li className='col-sm-7 section-describe'>
|
<li className='col-sm-7 section-describe'>
|
||||||
{
|
{'Version: ' + global.window.config.Version}<br/>
|
||||||
global.window.config.Version + ' (' +
|
{'Build Number: ' + global.window.config.BuildNumber}<br/>
|
||||||
global.window.config.BuildNumber + '/' +
|
{'Build Date: ' + global.window.config.BuildDate}<br/>
|
||||||
global.window.config.BuildDate + ')'
|
{'Build Hash: ' + global.window.config.BuildHash}<br/>
|
||||||
}
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div className='divider-dark'/>
|
<div className='divider-dark'/>
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user