diff --git a/Makefile b/Makefile index 4b6fbe2741..f512db2ec7 100644 --- a/Makefile +++ b/Makefile @@ -15,10 +15,12 @@ BUILD_ENTERPRISE_DIR ?= ../enterprise BUILD_ENTERPRISE ?= true BUILD_ENTERPRISE_READY = false BUILD_TYPE_NAME = team +BUILD_HASH_ENTERPRISE = none ifneq ($(wildcard $(BUILD_ENTERPRISE_DIR)/.),) ifeq ($(BUILD_ENTERPRISE),true) BUILD_ENTERPRISE_READY = true BUILD_TYPE_NAME = enterprise + BUILD_HASH_ENTERPRISE = $(shell cd $(BUILD_ENTERPRISE_DIR) && git rev-parse HEAD) else BUILD_ENTERPRISE_READY = false BUILD_TYPE_NAME = team @@ -37,6 +39,7 @@ GO_LINKER_FLAGS ?= -ldflags \ "-X github.com/mattermost/platform/model.BuildNumber=$(BUILD_NUMBER)\ -X 'github.com/mattermost/platform/model.BuildDate=$(BUILD_DATE)'\ -X github.com/mattermost/platform/model.BuildHash=$(BUILD_HASH)\ + -X github.com/mattermost/platform/model.BuildHashEnterprise=$(BUILD_HASH_ENTERPRISE)\ -X github.com/mattermost/platform/model.BuildEnterpriseReady=$(BUILD_ENTERPRISE_READY)" # Output paths diff --git a/i18n/en.json b/i18n/en.json index 99ca3ed724..d73196cf63 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -2073,7 +2073,7 @@ }, { "id": "mattermost.current_version", - "translation": "Current version is %v (%v/%v/%v)" + "translation": "Current version is %v (%v/%v/%v/%v)" }, { "id": "mattermost.entreprise_enabled", diff --git a/i18n/es.json b/i18n/es.json index bd2acc5e8e..ee04913a0a 100644 --- a/i18n/es.json +++ b/i18n/es.json @@ -2073,7 +2073,7 @@ }, { "id": "mattermost.current_version", - "translation": "La versión actual es %v (%v/%v/%v)" + "translation": "La versión actual es %v (%v/%v/%v/%v)" }, { "id": "mattermost.entreprise_enabled", diff --git a/i18n/fr.json b/i18n/fr.json index 43d1ddd000..fdad5666f9 100644 --- a/i18n/fr.json +++ b/i18n/fr.json @@ -2073,7 +2073,7 @@ }, { "id": "mattermost.current_version", - "translation": "Version courante %v (%v/%v/%v)" + "translation": "Version courante %v (%v/%v/%v/%v)" }, { "id": "mattermost.entreprise_enabled", diff --git a/i18n/ja.json b/i18n/ja.json index b20c5f69be..3745f4146e 100644 --- a/i18n/ja.json +++ b/i18n/ja.json @@ -2073,7 +2073,7 @@ }, { "id": "mattermost.current_version", - "translation": "現在のバージョンは%v (%v/%v/%v)です" + "translation": "現在のバージョンは%v (%v/%v/%v/%v)です" }, { "id": "mattermost.entreprise_enabled", diff --git a/i18n/pt.json b/i18n/pt.json index 564d3033e6..a0b37ae366 100644 --- a/i18n/pt.json +++ b/i18n/pt.json @@ -2073,7 +2073,7 @@ }, { "id": "mattermost.current_version", - "translation": "Versão atual é %v (%v/%v/%v)" + "translation": "Versão atual é %v (%v/%v/%v/%v)" }, { "id": "mattermost.entreprise_enabled", diff --git a/mattermost.go b/mattermost.go index afac188300..3def1e0d98 100644 --- a/mattermost.go +++ b/mattermost.go @@ -88,7 +88,7 @@ func main() { } pwd, _ := os.Getwd() - l4g.Info(utils.T("mattermost.current_version"), model.CurrentVersion, model.BuildNumber, model.BuildDate, model.BuildHash) + l4g.Info(utils.T("mattermost.current_version"), model.CurrentVersion, model.BuildNumber, model.BuildDate, model.BuildHash, model.BuildHashEnterprise) l4g.Info(utils.T("mattermost.entreprise_enabled"), model.BuildEnterpriseReady) l4g.Info(utils.T("mattermost.working_dir"), pwd) l4g.Info(utils.T("mattermost.config_file"), utils.FindConfigFile(flagConfigFile)) diff --git a/model/version.go b/model/version.go index 4a47f06efd..dde9eccd7d 100644 --- a/model/version.go +++ b/model/version.go @@ -33,6 +33,7 @@ var CurrentVersion string = versions[0] var BuildNumber string var BuildDate string var BuildHash string +var BuildHashEnterprise string var BuildEnterpriseReady string var versionsWithoutHotFixes []string diff --git a/utils/config.go b/utils/config.go index 9ac1617cd0..313b4e29ca 100644 --- a/utils/config.go +++ b/utils/config.go @@ -198,6 +198,7 @@ func getClientConfig(c *model.Config) map[string]string { props["BuildNumber"] = model.BuildNumber props["BuildDate"] = model.BuildDate props["BuildHash"] = model.BuildHash + props["BuildHashEnterprise"] = model.BuildHashEnterprise props["BuildEnterpriseReady"] = model.BuildEnterpriseReady props["SiteName"] = c.TeamSettings.SiteName diff --git a/webapp/components/about_build_modal.jsx b/webapp/components/about_build_modal.jsx index 22354d80e1..2f7b3e7814 100644 --- a/webapp/components/about_build_modal.jsx +++ b/webapp/components/about_build_modal.jsx @@ -157,6 +157,12 @@ export default class AboutBuildModal extends React.Component { defaultMessage='Build Hash:' />  {config.BuildHash} +
+ +  {config.BuildHashEnterprise}