Add debug-server task to make file to run mattermost using delve (#9290)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
4a02383176
Коммит
3cf7fcdbfb
10
Makefile
10
Makefile
@@ -46,6 +46,7 @@ endif
|
|||||||
GOPATH ?= $(shell go env GOPATH)
|
GOPATH ?= $(shell go env GOPATH)
|
||||||
GOFLAGS ?= $(GOFLAGS:)
|
GOFLAGS ?= $(GOFLAGS:)
|
||||||
GO=go
|
GO=go
|
||||||
|
DELVE=dlv
|
||||||
GO_LINKER_FLAGS ?= -ldflags \
|
GO_LINKER_FLAGS ?= -ldflags \
|
||||||
"-X github.com/mattermost/mattermost-server/model.BuildNumber=$(BUILD_NUMBER)\
|
"-X github.com/mattermost/mattermost-server/model.BuildNumber=$(BUILD_NUMBER)\
|
||||||
-X 'github.com/mattermost/mattermost-server/model.BuildDate=$(BUILD_DATE)'\
|
-X 'github.com/mattermost/mattermost-server/model.BuildDate=$(BUILD_DATE)'\
|
||||||
@@ -390,6 +391,15 @@ run-server: start-docker ## Starts the server.
|
|||||||
mkdir -p $(BUILD_WEBAPP_DIR)/dist/files
|
mkdir -p $(BUILD_WEBAPP_DIR)/dist/files
|
||||||
$(GO) run $(GOFLAGS) $(GO_LINKER_FLAGS) $(PLATFORM_FILES) --disableconfigwatch &
|
$(GO) run $(GOFLAGS) $(GO_LINKER_FLAGS) $(PLATFORM_FILES) --disableconfigwatch &
|
||||||
|
|
||||||
|
debug-server: start-docker
|
||||||
|
mkdir -p $(BUILD_WEBAPP_DIR)/dist/files
|
||||||
|
$(DELVE) debug $(PLATFORM_FILES) --build-flags="-ldflags '\
|
||||||
|
-X github.com/mattermost/mattermost-server/model.BuildNumber=$(BUILD_NUMBER)\
|
||||||
|
-X \"github.com/mattermost/mattermost-server/model.BuildDate=$(BUILD_DATE)\"\
|
||||||
|
-X github.com/mattermost/mattermost-server/model.BuildHash=$(BUILD_HASH)\
|
||||||
|
-X github.com/mattermost/mattermost-server/model.BuildHashEnterprise=$(BUILD_HASH_ENTERPRISE)\
|
||||||
|
-X github.com/mattermost/mattermost-server/model.BuildEnterpriseReady=$(BUILD_ENTERPRISE_READY)'"
|
||||||
|
|
||||||
run-cli: start-docker ## Runs CLI.
|
run-cli: start-docker ## Runs CLI.
|
||||||
@echo Running mattermost for development
|
@echo Running mattermost for development
|
||||||
@echo Example should be like 'make ARGS="-version" run-cli'
|
@echo Example should be like 'make ARGS="-version" run-cli'
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user