diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 34 |
1 files changed, 16 insertions, 18 deletions
@@ -69,18 +69,9 @@ TESTFLAGS ?= -short TESTFLAGSEE ?= -short # Packages lists -TE_PACKAGES=$(shell go list ./... | grep -v vendor) +TE_PACKAGES=$(shell go list ./...) TE_PACKAGES_COMMA=$(shell echo $(TE_PACKAGES) | tr ' ' ',') -EE_PACKAGES=$(shell go list ./enterprise/... | grep -v vendor | tail -n +2) -EE_PACKAGES_COMMA=$(shell echo $(EE_PACKAGES) | tr ' ' ',') - -ifeq ($(BUILD_ENTERPRISE_READY),true) -ALL_PACKAGES_COMMA=$(TE_PACKAGES_COMMA),$(EE_PACKAGES_COMMA) -else -ALL_PACKAGES_COMMA=$(TE_PACKAGES_COMMA) -endif - # Prepares the enterprise build if exists. The IGNORE stuff is a hack to get the Makefile to execute the commands outside a target ifeq ($(BUILD_ENTERPRISE_READY),true) IGNORE:=$(shell echo Enterprise build selected, preparing) @@ -90,6 +81,15 @@ ifeq ($(BUILD_ENTERPRISE_READY),true) IGNORE:=$(shell ln -s $(BUILD_ENTERPRISE_DIR) enterprise) endif +EE_PACKAGES=$(shell go list ./enterprise/...) +EE_PACKAGES_COMMA=$(shell echo $(EE_PACKAGES) | tr ' ' ',') + +ifeq ($(BUILD_ENTERPRISE_READY),true) +ALL_PACKAGES_COMMA=$(TE_PACKAGES_COMMA),$(EE_PACKAGES_COMMA) +else +ALL_PACKAGES_COMMA=$(TE_PACKAGES_COMMA) +endif + all: run @@ -318,18 +318,18 @@ do-cover-file: test-te: do-cover-file @echo Testing TE @echo "Packages to test: "$(TE_PACKAGES) - find . -name 'cprofile.out' -exec sh -c 'rm "{}"' \; + find . -name 'cprofile*.out' -exec sh -c 'rm "{}"' \; $(GO) test $(GOFLAGS) -run=$(TESTS) $(TESTFLAGS) -v -timeout=2000s -covermode=count -coverpkg=$(ALL_PACKAGES_COMMA) -exec $(ROOT)/scripts/test-xprog.sh $(TE_PACKAGES) - find . -name 'cprofile.out' -exec sh -c 'tail -n +2 {} >> cover.out ; rm "{}"' \; + find . -name 'cprofile*.out' -exec sh -c 'tail -n +2 {} >> cover.out ; rm "{}"' \; test-ee: do-cover-file @echo Testing EE ifeq ($(BUILD_ENTERPRISE_READY),true) @echo "Packages to test: "$(EE_PACKAGES) - find . -name 'cprofile.out' -exec sh -c 'rm "{}"' \; + find . -name 'cprofile*.out' -exec sh -c 'rm "{}"' \; $(GO) test $(GOFLAGS) -run=$(TESTS) $(TESTFLAGSEE) -p 1 -v -timeout=2000s -covermode=count -coverpkg=$(ALL_PACKAGES_COMMA) -exec $(ROOT)/scripts/test-xprog.sh $(EE_PACKAGES) - find . -name 'cprofile.out' -exec sh -c 'tail -n +2 {} >> cover.out ; rm "{}"' \; + find . -name 'cprofile*.out' -exec sh -c 'tail -n +2 {} >> cover.out ; rm "{}"' \; rm -f config/*.crt rm -f config/*.key endif @@ -370,9 +370,7 @@ run-cli: start-docker run-client: @echo Running mattermost client for development - @if [ ! -e client ]; then \ - ln -s $(BUILD_WEBAPP_DIR)/dist client; \ - fi + ln -nfs $(BUILD_WEBAPP_DIR)/dist client cd $(BUILD_WEBAPP_DIR) && $(MAKE) run run-client-fullmap: @@ -445,7 +443,7 @@ clean: stop-docker cd $(BUILD_WEBAPP_DIR) && $(MAKE) clean - rm -rf api/data + find . -type d -name data | xargs rm -r rm -rf logs rm -f mattermost.log |