Add build hash to makefile
Этот коммит содержится в:
14
Makefile
14
Makefile
@@ -201,6 +201,18 @@ endif
|
||||
# Playbooks
|
||||
BUILD_PLAYBOOKS_DIR ?= ../mattermost-plugin-playbooks
|
||||
BUILD_PLAYBOOKS ?= false
|
||||
BUILD_HASH_PLAYBOOKS = none
|
||||
|
||||
ifneq ($(wildcard $(BUILD_PLAYBOOKS_DIR)/.),)
|
||||
ifeq ($(BUILD_PLAYBOOKS),true)
|
||||
BUILD_PLAYBOOKS = true
|
||||
BUILD_HASH_PLAYBOOKS = $(shell cd $(BUILD_PLAYBOOKS_DIR) && git rev-parse HEAD)
|
||||
else
|
||||
BUILD_PLAYBOOKS = false
|
||||
endif
|
||||
else
|
||||
BUILD_PLAYBOOKS = false
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_PLAYBOOKS),true)
|
||||
IGNORE:=$(shell cp $(BUILD_PLAYBOOKS_DIR)/product/imports/playbooks_imports.go imports/)
|
||||
@@ -208,6 +220,8 @@ else
|
||||
IGNORE:=$(shell rm -f imports/playbooks_imports.go)
|
||||
endif
|
||||
|
||||
LDFLAGS += -X "github.com/mattermost/mattermost-server/v6/model.BuildHashPlaybooks=$(BUILD_HASH_PLAYBOOKS)"
|
||||
|
||||
all: run ## Alias for 'run'.
|
||||
|
||||
-include config.override.mk
|
||||
|
||||
@@ -225,6 +225,7 @@ func GenerateLimitedClientConfig(c *model.Config, telemetryID string, license *m
|
||||
props["BuildEnterpriseReady"] = model.BuildEnterpriseReady
|
||||
props["BuildHashBoards"] = model.BuildHashBoards
|
||||
props["BuildBoards"] = model.BuildBoards
|
||||
props["BuildHashPlaybooks"] = model.BuildHashPlaybooks
|
||||
|
||||
props["EnableBotAccountCreation"] = strconv.FormatBool(*c.ServiceSettings.EnableBotAccountCreation)
|
||||
props["EnableFile"] = strconv.FormatBool(*c.LogSettings.EnableFile)
|
||||
|
||||
@@ -117,6 +117,7 @@ var BuildHashEnterprise string
|
||||
var BuildEnterpriseReady string
|
||||
var BuildHashBoards string
|
||||
var BuildBoards string
|
||||
var BuildHashPlaybooks string
|
||||
var versionsWithoutHotFixes []string
|
||||
|
||||
func init() {
|
||||
|
||||
Ссылка в новой задаче
Block a user