2017-03-23 18:05:36 +00:00
|
|
|
.PHONY: build package run stop run-client run-server stop-client stop-server restart restart-server restart-client start-docker clean-dist clean nuke check-style check-client-style check-server-style check-unit-tests test dist setup-mac prepare-enteprise run-client-tests setup-run-client-tests cleanup-run-client-tests test-client build-linux build-osx build-windows internal-test-web-client vet run-server-for-web-client-tests
|
2015-06-14 23:53:32 -08:00
|
|
|
|
2016-05-12 15:08:58 -04:00
|
|
|
# For golang 1.5.x compatibility (remove when we don't want to support it anymore)
|
2016-05-12 23:56:07 -04:00
|
|
|
export GO15VENDOREXPERIMENT=1
|
2016-05-12 15:08:58 -04:00
|
|
|
|
2016-03-18 12:46:57 -04:00
|
|
|
# Build Flags
|
2015-06-14 23:53:32 -08:00
|
|
|
BUILD_NUMBER ?= $(BUILD_NUMBER:)
|
2015-09-16 17:45:00 -07:00
|
|
|
BUILD_DATE = $(shell date -u)
|
2015-09-17 13:01:40 -07:00
|
|
|
BUILD_HASH = $(shell git rev-parse HEAD)
|
2016-03-18 12:46:57 -04:00
|
|
|
# If we don't set the build number it defaults to dev
|
2015-06-14 23:53:32 -08:00
|
|
|
ifeq ($(BUILD_NUMBER),)
|
|
|
|
|
BUILD_NUMBER := dev
|
|
|
|
|
endif
|
2016-03-18 12:46:57 -04:00
|
|
|
BUILD_ENTERPRISE_DIR ?= ../enterprise
|
|
|
|
|
BUILD_ENTERPRISE ?= true
|
|
|
|
|
BUILD_ENTERPRISE_READY = false
|
2016-04-06 09:33:33 -04:00
|
|
|
BUILD_TYPE_NAME = team
|
2016-05-20 10:41:47 -04:00
|
|
|
BUILD_HASH_ENTERPRISE = none
|
2016-03-18 12:46:57 -04:00
|
|
|
ifneq ($(wildcard $(BUILD_ENTERPRISE_DIR)/.),)
|
|
|
|
|
ifeq ($(BUILD_ENTERPRISE),true)
|
|
|
|
|
BUILD_ENTERPRISE_READY = true
|
2016-04-06 09:33:33 -04:00
|
|
|
BUILD_TYPE_NAME = enterprise
|
2016-05-20 10:41:47 -04:00
|
|
|
BUILD_HASH_ENTERPRISE = $(shell cd $(BUILD_ENTERPRISE_DIR) && git rev-parse HEAD)
|
2016-03-18 12:46:57 -04:00
|
|
|
else
|
|
|
|
|
BUILD_ENTERPRISE_READY = false
|
2016-04-06 09:33:33 -04:00
|
|
|
BUILD_TYPE_NAME = team
|
2016-03-18 12:46:57 -04:00
|
|
|
endif
|
2015-07-29 23:55:45 -08:00
|
|
|
else
|
2016-03-18 12:46:57 -04:00
|
|
|
BUILD_ENTERPRISE_READY = false
|
2016-04-06 09:33:33 -04:00
|
|
|
BUILD_TYPE_NAME = team
|
2015-07-29 23:55:45 -08:00
|
|
|
endif
|
2016-03-18 12:46:57 -04:00
|
|
|
BUILD_WEBAPP_DIR = ./webapp
|
2015-07-29 23:55:45 -08:00
|
|
|
|
2016-03-18 12:46:57 -04:00
|
|
|
# Golang Flags
|
2016-05-12 23:56:07 -04:00
|
|
|
GOPATH ?= $(GOPATH:):./vendor
|
2016-03-18 12:46:57 -04:00
|
|
|
GOFLAGS ?= $(GOFLAGS:)
|
2016-05-12 23:56:07 -04:00
|
|
|
GO=go
|
2016-03-18 12:46:57 -04:00
|
|
|
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)\
|
2016-05-20 10:41:47 -04:00
|
|
|
-X github.com/mattermost/platform/model.BuildHashEnterprise=$(BUILD_HASH_ENTERPRISE)\
|
2016-03-18 12:46:57 -04:00
|
|
|
-X github.com/mattermost/platform/model.BuildEnterpriseReady=$(BUILD_ENTERPRISE_READY)"
|
|
|
|
|
|
2016-09-21 04:59:11 -07:00
|
|
|
# GOOS/GOARCH of the build host, used to determine whether we're cross-compiling or not
|
|
|
|
|
BUILDER_GOOS_GOARCH="$(shell $(GO) env GOOS)_$(shell $(GO) env GOARCH)"
|
|
|
|
|
|
2016-03-18 12:46:57 -04:00
|
|
|
# Output paths
|
2015-06-14 23:53:32 -08:00
|
|
|
DIST_ROOT=dist
|
|
|
|
|
DIST_PATH=$(DIST_ROOT)/mattermost
|
|
|
|
|
|
2016-03-18 12:46:57 -04:00
|
|
|
# Tests
|
2015-06-14 23:53:32 -08:00
|
|
|
TESTS=.
|
|
|
|
|
|
2017-05-25 11:01:53 -04:00
|
|
|
TESTFLAGS ?= -short
|
2017-06-05 16:40:17 -07:00
|
|
|
TESTFLAGSEE ?= -test.short
|
2017-05-25 11:01:53 -04:00
|
|
|
|
2017-03-16 17:00:00 -04:00
|
|
|
# Packages lists
|
|
|
|
|
TE_PACKAGES=$(shell go list ./... | grep -v vendor)
|
|
|
|
|
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
|
|
|
|
|
|
2017-07-25 15:10:00 -04:00
|
|
|
all: run
|
2015-11-27 16:36:57 -05:00
|
|
|
|
2016-03-18 12:46:57 -04:00
|
|
|
dist: | check-style test package
|
2015-11-22 20:39:03 -05:00
|
|
|
|
|
|
|
|
start-docker:
|
|
|
|
|
@echo Starting docker containers
|
|
|
|
|
|
|
|
|
|
@if [ $(shell docker ps -a | grep -ci mattermost-mysql) -eq 0 ]; then \
|
|
|
|
|
echo starting mattermost-mysql; \
|
|
|
|
|
docker run --name mattermost-mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=mostest \
|
|
|
|
|
-e MYSQL_USER=mmuser -e MYSQL_PASSWORD=mostest -e MYSQL_DATABASE=mattermost_test -d mysql:5.7 > /dev/null; \
|
|
|
|
|
elif [ $(shell docker ps | grep -ci mattermost-mysql) -eq 0 ]; then \
|
|
|
|
|
echo restarting mattermost-mysql; \
|
|
|
|
|
docker start mattermost-mysql > /dev/null; \
|
2015-09-17 16:27:25 -04:00
|
|
|
fi
|
|
|
|
|
|
2015-11-22 20:39:03 -05:00
|
|
|
@if [ $(shell docker ps -a | grep -ci mattermost-postgres) -eq 0 ]; then \
|
|
|
|
|
echo starting mattermost-postgres; \
|
|
|
|
|
docker run --name mattermost-postgres -p 5432:5432 -e POSTGRES_USER=mmuser -e POSTGRES_PASSWORD=mostest \
|
|
|
|
|
-d postgres:9.4 > /dev/null; \
|
|
|
|
|
elif [ $(shell docker ps | grep -ci mattermost-postgres) -eq 0 ]; then \
|
|
|
|
|
echo restarting mattermost-postgres; \
|
|
|
|
|
docker start mattermost-postgres > /dev/null; \
|
2016-04-21 22:37:01 -07:00
|
|
|
fi
|
|
|
|
|
|
2017-01-17 15:01:41 +01:00
|
|
|
@if [ $(shell docker ps -a | grep -ci mattermost-inbucket) -eq 0 ]; then \
|
|
|
|
|
echo starting mattermost-inbucket; \
|
|
|
|
|
docker run --name mattermost-inbucket -p 9000:10080 -p 2500:10025 -d jhillyerd/inbucket:latest > /dev/null; \
|
|
|
|
|
elif [ $(shell docker ps | grep -ci mattermost-inbucket) -eq 0 ]; then \
|
|
|
|
|
echo restarting mattermost-inbucket; \
|
|
|
|
|
docker start mattermost-inbucket > /dev/null; \
|
|
|
|
|
fi
|
|
|
|
|
|
2016-10-13 15:04:46 -03:00
|
|
|
ifeq ($(BUILD_ENTERPRISE_READY),true)
|
2016-04-21 22:37:01 -07:00
|
|
|
@echo Ldap test user test.one
|
|
|
|
|
@if [ $(shell docker ps -a | grep -ci mattermost-openldap) -eq 0 ]; then \
|
|
|
|
|
echo starting mattermost-openldap; \
|
|
|
|
|
docker run --name mattermost-openldap -p 389:389 -p 636:636 \
|
|
|
|
|
-e LDAP_TLS_VERIFY_CLIENT="never" \
|
|
|
|
|
-e LDAP_ORGANISATION="Mattermost Test" \
|
|
|
|
|
-e LDAP_DOMAIN="mm.test.com" \
|
|
|
|
|
-e LDAP_ADMIN_PASSWORD="mostest" \
|
2016-09-08 16:38:48 -04:00
|
|
|
-d osixia/openldap:1.1.6 > /dev/null;\
|
2016-04-21 22:37:01 -07:00
|
|
|
sleep 10; \
|
|
|
|
|
docker exec -ti mattermost-openldap bash -c 'echo -e "dn: ou=testusers,dc=mm,dc=test,dc=com\nobjectclass: organizationalunit" | ldapadd -x -D "cn=admin,dc=mm,dc=test,dc=com" -w mostest';\
|
|
|
|
|
docker exec -ti mattermost-openldap bash -c 'echo -e "dn: uid=test.one,ou=testusers,dc=mm,dc=test,dc=com\nobjectclass: iNetOrgPerson\nsn: User\ncn: Test1\nmail: success+testone@simulator.amazonses.com" | ldapadd -x -D "cn=admin,dc=mm,dc=test,dc=com" -w mostest';\
|
|
|
|
|
docker exec -ti mattermost-openldap bash -c 'ldappasswd -s Password1 -D "cn=admin,dc=mm,dc=test,dc=com" -x "uid=test.one,ou=testusers,dc=mm,dc=test,dc=com" -w mostest';\
|
|
|
|
|
docker exec -ti mattermost-openldap bash -c 'echo -e "dn: uid=test.two,ou=testusers,dc=mm,dc=test,dc=com\nobjectclass: iNetOrgPerson\nsn: User\ncn: Test2\nmail: success+testtwo@simulator.amazonses.com" | ldapadd -x -D "cn=admin,dc=mm,dc=test,dc=com" -w mostest';\
|
|
|
|
|
docker exec -ti mattermost-openldap bash -c 'ldappasswd -s Password1 -D "cn=admin,dc=mm,dc=test,dc=com" -x "uid=test.two,ou=testusers,dc=mm,dc=test,dc=com" -w mostest';\
|
|
|
|
|
docker exec -ti mattermost-openldap bash -c 'echo -e "dn: cn=tgroup,ou=testusers,dc=mm,dc=test,dc=com\nobjectclass: groupOfUniqueNames\nuniqueMember: uid=test.one,ou=testusers,dc=mm,dc=test,dc=com" | ldapadd -x -D "cn=admin,dc=mm,dc=test,dc=com" -w mostest';\
|
|
|
|
|
elif [ $(shell docker ps | grep -ci mattermost-openldap) -eq 0 ]; then \
|
|
|
|
|
echo restarting mattermost-openldap; \
|
|
|
|
|
docker start mattermost-openldap > /dev/null; \
|
2015-11-23 14:23:49 -05:00
|
|
|
sleep 10; \
|
2015-11-22 20:39:03 -05:00
|
|
|
fi
|
2017-07-07 15:36:17 +01:00
|
|
|
|
|
|
|
|
@if [ $(shell docker ps -a | grep -ci mattermost-elasticsearch) -eq 0 ]; then \
|
|
|
|
|
echo starting mattermost-elasticsearch; \
|
|
|
|
|
docker run --name mattermost-elasticsearch -p 9200:9200 -e "http.host=0.0.0.0" -e "transport.host=127.0.0.1" -e "ES_JAVA_OPTS=-Xms250m -Xmx250m" -d grundleborg/elasticsearch:latest > /dev/null; \
|
|
|
|
|
elif [ $(shell docker ps | grep -ci mattermost-elasticsearch) -eq 0 ]; then \
|
|
|
|
|
echo restarting mattermost-elasticsearch; \
|
|
|
|
|
docker start mattermost-elasticsearch> /dev/null; \
|
|
|
|
|
fi
|
2017-07-31 08:15:23 -07:00
|
|
|
|
|
|
|
|
@if [ $(shell docker ps -a | grep -ci mattermost-redis) -eq 0 ]; then \
|
|
|
|
|
echo starting mattermost-redis; \
|
|
|
|
|
docker run --name mattermost-redis -p 6379:6379 -d redis > /dev/null; \
|
|
|
|
|
elif [ $(shell docker ps | grep -ci mattermost-redis) -eq 0 ]; then \
|
|
|
|
|
echo restarting mattermost-redis; \
|
|
|
|
|
docker start mattermost-redis > /dev/null; \
|
|
|
|
|
fi
|
2016-10-13 15:04:46 -03:00
|
|
|
endif
|
2016-09-15 09:35:44 -03:00
|
|
|
|
2015-11-22 20:39:03 -05:00
|
|
|
stop-docker:
|
|
|
|
|
@echo Stopping docker containers
|
2015-06-14 23:53:32 -08:00
|
|
|
|
2015-11-22 20:39:03 -05:00
|
|
|
@if [ $(shell docker ps -a | grep -ci mattermost-mysql) -eq 1 ]; then \
|
|
|
|
|
echo stopping mattermost-mysql; \
|
|
|
|
|
docker stop mattermost-mysql > /dev/null; \
|
|
|
|
|
fi
|
2015-06-14 23:53:32 -08:00
|
|
|
|
2015-11-22 20:39:03 -05:00
|
|
|
@if [ $(shell docker ps -a | grep -ci mattermost-postgres) -eq 1 ]; then \
|
|
|
|
|
echo stopping mattermost-postgres; \
|
|
|
|
|
docker stop mattermost-postgres > /dev/null; \
|
|
|
|
|
fi
|
2016-10-17 09:52:47 -04:00
|
|
|
|
2016-04-21 22:37:01 -07:00
|
|
|
@if [ $(shell docker ps -a | grep -ci mattermost-openldap) -eq 1 ]; then \
|
|
|
|
|
echo stopping mattermost-openldap; \
|
|
|
|
|
docker stop mattermost-openldap > /dev/null; \
|
|
|
|
|
fi
|
2015-06-14 23:53:32 -08:00
|
|
|
|
2017-01-17 15:01:41 +01:00
|
|
|
@if [ $(shell docker ps -a | grep -ci mattermost-inbucket) -eq 1 ]; then \
|
|
|
|
|
echo stopping mattermost-inbucket; \
|
|
|
|
|
docker stop mattermost-inbucket > /dev/null; \
|
|
|
|
|
fi
|
|
|
|
|
|
2017-07-07 15:36:17 +01:00
|
|
|
@if [ $(shell docker ps -a | grep -ci mattermost-elasticsearch) -eq 1 ]; then \
|
|
|
|
|
echo stopping mattermost-elasticsearch; \
|
|
|
|
|
docker stop mattermost-elasticsearch > /dev/null; \
|
|
|
|
|
fi
|
|
|
|
|
|
2015-11-22 20:39:03 -05:00
|
|
|
clean-docker:
|
|
|
|
|
@echo Removing docker containers
|
2015-06-14 23:53:32 -08:00
|
|
|
|
|
|
|
|
@if [ $(shell docker ps -a | grep -ci mattermost-mysql) -eq 1 ]; then \
|
2016-04-21 22:37:01 -07:00
|
|
|
echo removing mattermost-mysql; \
|
2015-06-14 23:53:32 -08:00
|
|
|
docker stop mattermost-mysql > /dev/null; \
|
|
|
|
|
docker rm -v mattermost-mysql > /dev/null; \
|
|
|
|
|
fi
|
|
|
|
|
|
2015-11-22 20:39:03 -05:00
|
|
|
@if [ $(shell docker ps -a | grep -ci mattermost-postgres) -eq 1 ]; then \
|
2016-04-21 22:37:01 -07:00
|
|
|
echo removing mattermost-postgres; \
|
2015-11-22 20:39:03 -05:00
|
|
|
docker stop mattermost-postgres > /dev/null; \
|
|
|
|
|
docker rm -v mattermost-postgres > /dev/null; \
|
|
|
|
|
fi
|
|
|
|
|
|
2016-04-21 22:37:01 -07:00
|
|
|
@if [ $(shell docker ps -a | grep -ci mattermost-openldap) -eq 1 ]; then \
|
|
|
|
|
echo removing mattermost-openldap; \
|
|
|
|
|
docker stop mattermost-openldap > /dev/null; \
|
|
|
|
|
docker rm -v mattermost-openldap > /dev/null; \
|
|
|
|
|
fi
|
|
|
|
|
|
2017-01-17 15:01:41 +01:00
|
|
|
@if [ $(shell docker ps -a | grep -ci mattermost-inbucket) -eq 1 ]; then \
|
|
|
|
|
echo removing mattermost-inbucket; \
|
|
|
|
|
docker stop mattermost-inbucket > /dev/null; \
|
|
|
|
|
docker rm -v mattermost-inbucket > /dev/null; \
|
|
|
|
|
fi
|
|
|
|
|
|
2017-07-07 15:36:17 +01:00
|
|
|
@if [ $(shell docker ps -a | grep -ci mattermost-elasticsearch) -eq 1 ]; then \
|
|
|
|
|
echo removing mattermost-elasticsearch; \
|
|
|
|
|
docker stop mattermost-elasticsearch > /dev/null; \
|
|
|
|
|
docker rm -v mattermost-elasticsearch > /dev/null; \
|
|
|
|
|
fi
|
|
|
|
|
|
2016-05-13 16:17:07 -04:00
|
|
|
check-client-style:
|
|
|
|
|
@echo Checking client style
|
|
|
|
|
|
|
|
|
|
cd $(BUILD_WEBAPP_DIR) && $(MAKE) check-style
|
2016-10-17 09:52:47 -04:00
|
|
|
|
2017-02-09 13:39:15 -08:00
|
|
|
check-server-style: govet
|
2016-03-18 12:46:57 -04:00
|
|
|
@echo Running GOFMT
|
2016-12-06 10:49:34 -05:00
|
|
|
$(eval GOFMT_OUTPUT := $(shell gofmt -d -s api/ model/ store/ utils/ manualtesting/ einterfaces/ cmd/platform/ 2>&1))
|
2016-03-18 12:46:57 -04:00
|
|
|
@echo "$(GOFMT_OUTPUT)"
|
|
|
|
|
@if [ ! "$(GOFMT_OUTPUT)" ]; then \
|
2017-03-20 09:15:05 -04:00
|
|
|
echo "gofmt success"; \
|
2016-03-18 12:46:57 -04:00
|
|
|
else \
|
|
|
|
|
echo "gofmt failure"; \
|
|
|
|
|
exit 1; \
|
|
|
|
|
fi
|
2015-11-22 20:39:03 -05:00
|
|
|
|
2016-05-13 16:17:07 -04:00
|
|
|
check-style: check-client-style check-server-style
|
|
|
|
|
|
2017-04-04 11:42:07 -07:00
|
|
|
test-te-race: start-docker prepare-enterprise
|
|
|
|
|
@echo Testing TE race conditions
|
|
|
|
|
|
|
|
|
|
@echo "Packages to test: "$(TE_PACKAGES)
|
|
|
|
|
|
|
|
|
|
@for package in $(TE_PACKAGES); do \
|
|
|
|
|
echo "Testing "$$package; \
|
2017-04-05 18:32:04 -04:00
|
|
|
$(GO) test $(GOFLAGS) -race -run=$(TESTS) -test.timeout=4000s $$package || exit 1; \
|
2017-04-04 11:42:07 -07:00
|
|
|
done
|
|
|
|
|
|
|
|
|
|
test-ee-race: start-docker prepare-enterprise
|
|
|
|
|
@echo Testing EE race conditions
|
|
|
|
|
|
|
|
|
|
ifeq ($(BUILD_ENTERPRISE_READY),true)
|
|
|
|
|
@echo "Packages to test: "$(EE_PACKAGES)
|
|
|
|
|
|
|
|
|
|
for package in $(EE_PACKAGES); do \
|
|
|
|
|
echo "Testing "$$package; \
|
|
|
|
|
$(GO) test $(GOFLAGS) -race -run=$(TESTS) -c $$package; \
|
|
|
|
|
if [ -f $$(basename $$package).test ]; then \
|
|
|
|
|
echo "Testing "$$package; \
|
2017-04-05 11:20:44 -04:00
|
|
|
./$$(basename $$package).test -test.timeout=2000s || exit 1; \
|
2017-04-04 11:42:07 -07:00
|
|
|
rm -r $$(basename $$package).test; \
|
|
|
|
|
fi; \
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
rm -f config/*.crt
|
|
|
|
|
rm -f config/*.key
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
test-server-race: test-te-race test-ee-race
|
|
|
|
|
|
2017-04-05 08:15:58 -04:00
|
|
|
do-cover-file:
|
|
|
|
|
@echo "mode: count" > cover.out
|
|
|
|
|
|
|
|
|
|
test-te: start-docker prepare-enterprise do-cover-file
|
2017-03-16 17:00:00 -04:00
|
|
|
@echo Testing TE
|
2016-04-21 22:37:01 -07:00
|
|
|
|
2017-03-16 17:00:00 -04:00
|
|
|
|
|
|
|
|
@echo "Packages to test: "$(TE_PACKAGES)
|
|
|
|
|
|
|
|
|
|
@for package in $(TE_PACKAGES); do \
|
|
|
|
|
echo "Testing "$$package; \
|
2017-05-25 11:01:53 -04:00
|
|
|
$(GO) test $(GOFLAGS) -run=$(TESTS) $(TESTFLAGS) -test.v -test.timeout=2000s -covermode=count -coverprofile=cprofile.out -coverpkg=$(ALL_PACKAGES_COMMA) $$package || exit 1; \
|
2017-03-16 17:00:00 -04:00
|
|
|
if [ -f cprofile.out ]; then \
|
|
|
|
|
tail -n +2 cprofile.out >> cover.out; \
|
|
|
|
|
rm cprofile.out; \
|
|
|
|
|
fi; \
|
|
|
|
|
done
|
|
|
|
|
|
2017-04-03 13:32:58 -04:00
|
|
|
test-postgres: start-docker prepare-enterprise
|
|
|
|
|
@echo Testing Postgres
|
|
|
|
|
|
|
|
|
|
@sed -i'' -e 's|"DriverName": "mysql"|"DriverName": "postgres"|g' config/config.json
|
|
|
|
|
@sed -i'' -e 's|"DataSource": "mmuser:mostest@tcp(dockerhost:3306)/mattermost_test?charset=utf8mb4,utf8"|"DataSource": "postgres://mmuser:mostest@dockerhost:5432?sslmode=disable"|g' config/config.json
|
|
|
|
|
|
|
|
|
|
$(GO) test $(GOFLAGS) -run=$(TESTS) -test.v -test.timeout=2000s -covermode=count -coverprofile=cprofile.out -coverpkg=$(ALL_PACKAGES_COMMA) github.com/mattermost/platform/store || exit 1; \
|
|
|
|
|
if [ -f cprofile.out ]; then \
|
|
|
|
|
tail -n +2 cprofile.out >> cover.out; \
|
|
|
|
|
rm cprofile.out; \
|
|
|
|
|
fi; \
|
|
|
|
|
|
|
|
|
|
@sed -i'' -e 's|"DataSource": "postgres://mmuser:mostest@dockerhost:5432?sslmode=disable"|"DataSource": "mmuser:mostest@tcp(dockerhost:3306)/mattermost_test?charset=utf8mb4,utf8"|g' config/config.json
|
|
|
|
|
@sed -i'' -e 's|"DriverName": "postgres"|"DriverName": "mysql"|g' config/config.json
|
|
|
|
|
@rm config/config.json-e
|
|
|
|
|
|
2017-04-05 08:15:58 -04:00
|
|
|
test-ee: start-docker prepare-enterprise do-cover-file
|
2017-03-16 17:00:00 -04:00
|
|
|
@echo Testing EE
|
2016-05-20 09:40:52 -04:00
|
|
|
|
2016-04-21 22:37:01 -07:00
|
|
|
ifeq ($(BUILD_ENTERPRISE_READY),true)
|
2017-03-16 17:00:00 -04:00
|
|
|
@echo "Packages to test: "$(EE_PACKAGES)
|
|
|
|
|
|
|
|
|
|
for package in $(EE_PACKAGES); do \
|
|
|
|
|
echo "Testing "$$package; \
|
|
|
|
|
$(GO) test $(GOFLAGS) -run=$(TESTS) -covermode=count -coverpkg=$(ALL_PACKAGES_COMMA) -c $$package; \
|
|
|
|
|
if [ -f $$(basename $$package).test ]; then \
|
|
|
|
|
echo "Testing "$$package; \
|
2017-06-05 16:40:17 -07:00
|
|
|
./$$(basename $$package).test -test.v $(TESTFLAGSEE) -test.timeout=2000s -test.coverprofile=cprofile.out || exit 1; \
|
2017-03-16 17:00:00 -04:00
|
|
|
if [ -f cprofile.out ]; then \
|
|
|
|
|
tail -n +2 cprofile.out >> cover.out; \
|
|
|
|
|
rm cprofile.out; \
|
|
|
|
|
fi; \
|
|
|
|
|
rm -r $$(basename $$package).test; \
|
|
|
|
|
fi; \
|
|
|
|
|
done
|
2016-05-20 09:40:52 -04:00
|
|
|
|
2016-07-13 07:38:58 -04:00
|
|
|
rm -f config/*.crt
|
|
|
|
|
rm -f config/*.key
|
2016-04-21 22:37:01 -07:00
|
|
|
endif
|
|
|
|
|
|
2017-03-16 17:00:00 -04:00
|
|
|
test-server: test-te test-ee
|
|
|
|
|
|
2016-05-26 07:58:24 -04:00
|
|
|
internal-test-web-client: start-docker prepare-enterprise
|
2016-12-06 10:49:34 -05:00
|
|
|
$(GO) run $(GOFLAGS) ./cmd/platform/*go test web_client_tests
|
2016-04-21 22:37:01 -07:00
|
|
|
|
2017-03-23 18:05:36 +00:00
|
|
|
run-server-for-web-client-tests:
|
|
|
|
|
$(GO) run $(GOFLAGS) ./cmd/platform/*go test web_client_tests_server
|
|
|
|
|
|
2016-05-13 16:17:07 -04:00
|
|
|
test-client: start-docker prepare-enterprise
|
|
|
|
|
@echo Running client tests
|
2016-04-21 22:37:01 -07:00
|
|
|
|
|
|
|
|
cd $(BUILD_WEBAPP_DIR) && $(MAKE) test
|
|
|
|
|
|
2016-05-13 16:17:07 -04:00
|
|
|
test: test-server test-client
|
2015-06-14 23:53:32 -08:00
|
|
|
|
2016-05-20 09:40:52 -04:00
|
|
|
cover:
|
|
|
|
|
@echo Opening coverage info in browser. If this failed run make test first
|
|
|
|
|
|
|
|
|
|
$(GO) tool cover -html=cover.out
|
|
|
|
|
$(GO) tool cover -html=ecover.out
|
|
|
|
|
|
2016-03-18 12:46:57 -04:00
|
|
|
.prebuild:
|
|
|
|
|
@echo Preparation for running go code
|
2016-05-12 23:56:07 -04:00
|
|
|
go get $(GOFLAGS) github.com/Masterminds/glide
|
2015-06-14 23:53:32 -08:00
|
|
|
|
2016-03-18 12:46:57 -04:00
|
|
|
touch $@
|
2015-09-14 15:30:51 +03:00
|
|
|
|
2016-03-18 12:46:57 -04:00
|
|
|
prepare-enterprise:
|
|
|
|
|
ifeq ($(BUILD_ENTERPRISE_READY),true)
|
2016-04-21 22:37:01 -07:00
|
|
|
@echo Enterprise build selected, preparing
|
2017-05-18 15:05:57 -04:00
|
|
|
mkdir -p imports/
|
|
|
|
|
cp $(BUILD_ENTERPRISE_DIR)/imports/imports.go imports/
|
2016-05-12 23:56:07 -04:00
|
|
|
rm -f enterprise
|
|
|
|
|
ln -s $(BUILD_ENTERPRISE_DIR) enterprise
|
2016-03-18 12:46:57 -04:00
|
|
|
endif
|
2015-11-22 20:39:03 -05:00
|
|
|
|
2016-04-06 09:33:33 -04:00
|
|
|
build-linux: .prebuild prepare-enterprise
|
|
|
|
|
@echo Build Linux amd64
|
2016-12-06 10:49:34 -05:00
|
|
|
env GOOS=linux GOARCH=amd64 $(GO) install $(GOFLAGS) $(GO_LINKER_FLAGS) ./cmd/platform
|
2015-11-22 20:39:03 -05:00
|
|
|
|
2016-04-06 09:33:33 -04:00
|
|
|
build-osx: .prebuild prepare-enterprise
|
|
|
|
|
@echo Build OSX amd64
|
2016-12-06 10:49:34 -05:00
|
|
|
env GOOS=darwin GOARCH=amd64 $(GO) install $(GOFLAGS) $(GO_LINKER_FLAGS) ./cmd/platform
|
2016-04-06 09:33:33 -04:00
|
|
|
|
|
|
|
|
build-windows: .prebuild prepare-enterprise
|
|
|
|
|
@echo Build Windows amd64
|
2016-12-06 10:49:34 -05:00
|
|
|
env GOOS=windows GOARCH=amd64 $(GO) install $(GOFLAGS) $(GO_LINKER_FLAGS) ./cmd/platform
|
2016-04-06 09:33:33 -04:00
|
|
|
|
|
|
|
|
build: build-linux build-windows build-osx
|
2015-11-22 20:39:03 -05:00
|
|
|
|
2016-03-18 12:46:57 -04:00
|
|
|
build-client:
|
|
|
|
|
@echo Building mattermost web app
|
2015-11-30 09:56:53 -05:00
|
|
|
|
2016-03-24 22:34:35 +09:00
|
|
|
cd $(BUILD_WEBAPP_DIR) && $(MAKE) build
|
2016-02-17 10:14:29 -05:00
|
|
|
|
2017-05-18 15:05:57 -04:00
|
|
|
build-job-server: build-job-server-linux build-job-server-mac build-job-server-windows
|
|
|
|
|
|
|
|
|
|
build-job-server-linux: .prebuild prepare-enterprise
|
|
|
|
|
@echo Build mattermost job server for Linux amd64
|
|
|
|
|
env GOOS=linux GOARCH=amd64 $(GO) build $(GOFLAGS) $(GO_LINKER_FLAGS) ./jobs/jobserver
|
|
|
|
|
|
|
|
|
|
build-job-server-osx: .prebuild prepare-enterprise
|
|
|
|
|
@echo Build mattermost job server for OSX amd64
|
|
|
|
|
env GOOS=darwin GOARCH=amd64 $(GO) build $(GOFLAGS) $(GO_LINKER_FLAGS) ./jobs/jobserver
|
|
|
|
|
|
|
|
|
|
build-job-server-windows: .prebuild prepare-enterprise
|
|
|
|
|
@echo Build mattermost job server for Windows amd64
|
|
|
|
|
env GOOS=windows GOARCH=amd64 $(GO) build $(GOFLAGS) $(GO_LINKER_FLAGS) ./jobs/jobserver
|
2016-02-17 10:14:29 -05:00
|
|
|
|
2016-03-18 12:46:57 -04:00
|
|
|
package: build build-client
|
|
|
|
|
@ echo Packaging mattermost
|
2016-03-16 23:00:33 -04:00
|
|
|
|
2016-04-06 09:33:33 -04:00
|
|
|
@# Remove any old files
|
2016-03-18 12:46:57 -04:00
|
|
|
rm -Rf $(DIST_ROOT)
|
2015-06-14 23:53:32 -08:00
|
|
|
|
2016-04-06 09:33:33 -04:00
|
|
|
@# Create needed directories
|
2016-03-18 12:46:57 -04:00
|
|
|
mkdir -p $(DIST_PATH)/bin
|
|
|
|
|
mkdir -p $(DIST_PATH)/logs
|
2015-12-08 13:38:43 -05:00
|
|
|
|
2016-04-06 09:33:33 -04:00
|
|
|
@# Resource directories
|
2016-03-18 12:46:57 -04:00
|
|
|
cp -RL config $(DIST_PATH)
|
|
|
|
|
cp -RL fonts $(DIST_PATH)
|
|
|
|
|
cp -RL templates $(DIST_PATH)
|
|
|
|
|
cp -RL i18n $(DIST_PATH)
|
|
|
|
|
|
2016-10-17 09:52:47 -04:00
|
|
|
@# Disable developer settings
|
2016-10-18 12:37:27 -04:00
|
|
|
sed -i'' -e 's|"ConsoleLevel": "DEBUG"|"ConsoleLevel": "INFO"|g' $(DIST_PATH)/config/config.json
|
2017-04-04 11:54:52 -04:00
|
|
|
sed -i'' -e 's|"SiteURL": "http://localhost:8065"|"SiteURL": ""|g' $(DIST_PATH)/config/config.json
|
2016-10-17 09:52:47 -04:00
|
|
|
|
2017-01-17 15:01:41 +01:00
|
|
|
@# Reset email sending to original configuration
|
|
|
|
|
sed -i'' -e 's|"SendEmailNotifications": true,|"SendEmailNotifications": false,|g' $(DIST_PATH)/config/config.json
|
|
|
|
|
sed -i'' -e 's|"FeedbackEmail": "test@example.com",|"FeedbackEmail": "",|g' $(DIST_PATH)/config/config.json
|
|
|
|
|
sed -i'' -e 's|"SMTPServer": "dockerhost",|"SMTPServer": "",|g' $(DIST_PATH)/config/config.json
|
|
|
|
|
sed -i'' -e 's|"SMTPPort": "2500",|"SMTPPort": "",|g' $(DIST_PATH)/config/config.json
|
|
|
|
|
|
2016-04-06 09:33:33 -04:00
|
|
|
@# Package webapp
|
2016-03-18 12:46:57 -04:00
|
|
|
mkdir -p $(DIST_PATH)/webapp/dist
|
|
|
|
|
cp -RL $(BUILD_WEBAPP_DIR)/dist $(DIST_PATH)/webapp
|
|
|
|
|
|
2016-04-06 09:33:33 -04:00
|
|
|
@# Help files
|
2016-03-18 12:46:57 -04:00
|
|
|
ifeq ($(BUILD_ENTERPRISE_READY),true)
|
|
|
|
|
cp $(BUILD_ENTERPRISE_DIR)/ENTERPRISE-EDITION-LICENSE.txt $(DIST_PATH)
|
|
|
|
|
else
|
|
|
|
|
cp build/MIT-COMPILED-LICENSE.md $(DIST_PATH)
|
|
|
|
|
endif
|
|
|
|
|
cp NOTICE.txt $(DIST_PATH)
|
|
|
|
|
cp README.md $(DIST_PATH)
|
|
|
|
|
|
2016-04-06 09:33:33 -04:00
|
|
|
@# ----- PLATFORM SPECIFIC -----
|
|
|
|
|
|
|
|
|
|
@# Make osx package
|
|
|
|
|
@# Copy binary
|
2016-09-21 04:59:11 -07:00
|
|
|
ifeq ($(BUILDER_GOOS_GOARCH),"darwin_amd64")
|
|
|
|
|
cp $(GOPATH)/bin/platform $(DIST_PATH)/bin # from native bin dir, not cross-compiled
|
|
|
|
|
else
|
|
|
|
|
cp $(GOPATH)/bin/darwin_amd64/platform $(DIST_PATH)/bin # from cross-compiled bin dir
|
|
|
|
|
endif
|
2016-04-06 09:33:33 -04:00
|
|
|
@# Package
|
|
|
|
|
tar -C dist -czf $(DIST_PATH)-$(BUILD_TYPE_NAME)-osx-amd64.tar.gz mattermost
|
|
|
|
|
@# Cleanup
|
|
|
|
|
rm -f $(DIST_PATH)/bin/platform
|
|
|
|
|
|
|
|
|
|
@# Make windows package
|
|
|
|
|
@# Copy binary
|
2016-09-21 04:59:11 -07:00
|
|
|
ifeq ($(BUILDER_GOOS_GOARCH),"windows_amd64")
|
|
|
|
|
cp $(GOPATH)/bin/platform.exe $(DIST_PATH)/bin # from native bin dir, not cross-compiled
|
|
|
|
|
else
|
|
|
|
|
cp $(GOPATH)/bin/windows_amd64/platform.exe $(DIST_PATH)/bin # from cross-compiled bin dir
|
|
|
|
|
endif
|
2016-04-06 09:33:33 -04:00
|
|
|
@# Package
|
2016-10-31 11:30:58 -04:00
|
|
|
cd $(DIST_ROOT) && zip -9 -r -q -l mattermost-$(BUILD_TYPE_NAME)-windows-amd64.zip mattermost && cd ..
|
2016-04-06 09:33:33 -04:00
|
|
|
@# Cleanup
|
|
|
|
|
rm -f $(DIST_PATH)/bin/platform.exe
|
|
|
|
|
|
|
|
|
|
@# Make linux package
|
|
|
|
|
@# Copy binary
|
2016-09-21 04:59:11 -07:00
|
|
|
ifeq ($(BUILDER_GOOS_GOARCH),"linux_amd64")
|
|
|
|
|
cp $(GOPATH)/bin/platform $(DIST_PATH)/bin # from native bin dir, not cross-compiled
|
|
|
|
|
else
|
|
|
|
|
cp $(GOPATH)/bin/linux_amd64/platform $(DIST_PATH)/bin # from cross-compiled bin dir
|
|
|
|
|
endif
|
2016-04-06 09:33:33 -04:00
|
|
|
@# Package
|
|
|
|
|
tar -C dist -czf $(DIST_PATH)-$(BUILD_TYPE_NAME)-linux-amd64.tar.gz mattermost
|
2016-09-21 04:59:11 -07:00
|
|
|
@# Don't clean up native package so dev machines will have an unzipped package available
|
2016-04-06 09:33:33 -04:00
|
|
|
@#rm -f $(DIST_PATH)/bin/platform
|
|
|
|
|
|
2016-03-18 12:46:57 -04:00
|
|
|
|
2016-03-22 11:35:39 -04:00
|
|
|
run-server: prepare-enterprise start-docker
|
2016-03-18 12:46:57 -04:00
|
|
|
@echo Running mattermost for development
|
|
|
|
|
|
|
|
|
|
mkdir -p $(BUILD_WEBAPP_DIR)/dist/files
|
2017-04-17 07:55:03 -07:00
|
|
|
$(GO) run $(GOFLAGS) $(GO_LINKER_FLAGS) ./cmd/platform/*.go --disableconfigwatch &
|
2016-03-18 12:46:57 -04:00
|
|
|
|
2016-07-06 10:11:21 -08:00
|
|
|
run-cli: prepare-enterprise start-docker
|
|
|
|
|
@echo Running mattermost for development
|
2016-10-19 14:49:25 -04:00
|
|
|
@echo Example should be like 'make ARGS="-version" run-cli'
|
2016-07-06 10:11:21 -08:00
|
|
|
|
2016-12-06 10:49:34 -05:00
|
|
|
$(GO) run $(GOFLAGS) $(GO_LINKER_FLAGS) ./cmd/platform/*.go ${ARGS}
|
2016-07-06 10:11:21 -08:00
|
|
|
|
2016-03-18 12:46:57 -04:00
|
|
|
run-client:
|
|
|
|
|
@echo Running mattermost client for development
|
|
|
|
|
|
2016-03-24 22:34:35 +09:00
|
|
|
cd $(BUILD_WEBAPP_DIR) && $(MAKE) run
|
2016-03-18 12:46:57 -04:00
|
|
|
|
2016-03-29 18:32:15 -04:00
|
|
|
run-client-fullmap:
|
|
|
|
|
@echo Running mattermost client for development with FULL SOURCE MAP
|
|
|
|
|
|
|
|
|
|
cd $(BUILD_WEBAPP_DIR) && $(MAKE) run-fullmap
|
|
|
|
|
|
2016-03-18 12:46:57 -04:00
|
|
|
run: run-server run-client
|
2016-02-17 10:14:29 -05:00
|
|
|
|
2016-03-29 18:32:15 -04:00
|
|
|
run-fullmap: run-server run-client-fullmap
|
|
|
|
|
|
2016-02-17 10:14:29 -05:00
|
|
|
stop-server:
|
2016-03-18 12:46:57 -04:00
|
|
|
@echo Stopping mattermost
|
|
|
|
|
|
2016-10-04 08:56:01 -04:00
|
|
|
ifeq ($(BUILDER_GOOS_GOARCH),"windows_amd64")
|
|
|
|
|
wmic process where "Caption='go.exe' and CommandLine like '%go.exe run%'" call terminate
|
|
|
|
|
wmic process where "Caption='mattermost.exe' and CommandLine like '%go-build%'" call terminate
|
|
|
|
|
else
|
2016-03-18 12:46:57 -04:00
|
|
|
@for PID in $$(ps -ef | grep "[g]o run" | awk '{ print $$2 }'); do \
|
2016-02-17 10:14:29 -05:00
|
|
|
echo stopping go $$PID; \
|
2015-06-14 23:53:32 -08:00
|
|
|
kill $$PID; \
|
|
|
|
|
done
|
2016-03-18 12:46:57 -04:00
|
|
|
@for PID in $$(ps -ef | grep "[g]o-build" | awk '{ print $$2 }'); do \
|
2016-02-17 10:14:29 -05:00
|
|
|
echo stopping mattermost $$PID; \
|
|
|
|
|
kill $$PID; \
|
|
|
|
|
done
|
2017-01-12 21:17:29 +05:30
|
|
|
endif
|
2015-07-27 09:48:35 -04:00
|
|
|
|
2016-03-18 08:48:26 -04:00
|
|
|
stop-client:
|
2016-03-18 12:46:57 -04:00
|
|
|
@echo Stopping mattermost client
|
2016-03-18 08:48:26 -04:00
|
|
|
|
2016-03-24 22:34:35 +09:00
|
|
|
cd $(BUILD_WEBAPP_DIR) && $(MAKE) stop
|
2015-12-08 13:38:43 -05:00
|
|
|
|
2016-03-18 12:46:57 -04:00
|
|
|
stop: stop-server stop-client
|
|
|
|
|
|
2016-07-05 11:10:28 -04:00
|
|
|
restart: restart-server restart-client
|
|
|
|
|
|
2016-03-18 12:46:57 -04:00
|
|
|
restart-server: | stop-server run-server
|
|
|
|
|
|
|
|
|
|
restart-client: | stop-client run-client
|
|
|
|
|
|
2017-05-18 15:05:57 -04:00
|
|
|
run-job-server:
|
|
|
|
|
@echo Running job server for development
|
|
|
|
|
$(GO) run $(GOFLAGS) $(GO_LINKER_FLAGS) ./jobs/jobserver/jobserver.go
|
|
|
|
|
|
2016-03-18 12:46:57 -04:00
|
|
|
clean: stop-docker
|
|
|
|
|
@echo Cleaning
|
|
|
|
|
|
|
|
|
|
rm -Rf $(DIST_ROOT)
|
|
|
|
|
go clean $(GOFLAGS) -i ./...
|
|
|
|
|
|
2016-03-24 22:34:35 +09:00
|
|
|
cd $(BUILD_WEBAPP_DIR) && $(MAKE) clean
|
2015-07-27 09:48:35 -04:00
|
|
|
|
2016-03-18 12:46:57 -04:00
|
|
|
rm -rf api/data
|
|
|
|
|
rm -rf logs
|
|
|
|
|
|
|
|
|
|
rm -f mattermost.log
|
2016-05-13 16:17:07 -04:00
|
|
|
rm -f npm-debug.log
|
|
|
|
|
rm -f api/mattermost.log
|
2016-03-18 12:46:57 -04:00
|
|
|
rm -f .prepare-go
|
2016-05-12 23:56:07 -04:00
|
|
|
rm -f enterprise
|
2016-05-20 09:40:52 -04:00
|
|
|
rm -f cover.out
|
|
|
|
|
rm -f ecover.out
|
|
|
|
|
rm -f *.out
|
|
|
|
|
rm -f *.test
|
2017-03-16 17:00:00 -04:00
|
|
|
rm -f imports.go
|
2016-03-18 12:46:57 -04:00
|
|
|
|
|
|
|
|
nuke: clean clean-docker
|
|
|
|
|
@echo BOOM
|
2015-07-27 09:48:35 -04:00
|
|
|
|
2016-03-18 12:46:57 -04:00
|
|
|
rm -rf data
|
2015-07-27 09:48:35 -04:00
|
|
|
|
2016-03-18 12:46:57 -04:00
|
|
|
setup-mac:
|
|
|
|
|
echo $$(boot2docker ip 2> /dev/null) dockerhost | sudo tee -a /etc/hosts
|
2017-01-02 20:24:03 -05:00
|
|
|
|
2017-02-09 13:39:15 -08:00
|
|
|
govet:
|
|
|
|
|
@echo Running GOVET
|
|
|
|
|
|
|
|
|
|
$(GO) vet $(GOFLAGS) ./api || exit 1
|
|
|
|
|
$(GO) vet $(GOFLAGS) ./api4 || exit 1
|
|
|
|
|
$(GO) vet $(GOFLAGS) ./app || exit 1
|
|
|
|
|
$(GO) vet $(GOFLAGS) ./cmd/platform || exit 1
|
|
|
|
|
$(GO) vet $(GOFLAGS) ./einterfaces || exit 1
|
2017-06-29 15:59:12 +01:00
|
|
|
$(GO) vet $(GOFLAGS) ./jobs || exit 1
|
|
|
|
|
$(GO) vet $(GOFLAGS) ./jobs/jobserver || exit 1
|
2017-02-09 13:39:15 -08:00
|
|
|
$(GO) vet $(GOFLAGS) ./manualtesting || exit 1
|
|
|
|
|
$(GO) vet $(GOFLAGS) ./model || exit 1
|
|
|
|
|
$(GO) vet $(GOFLAGS) ./model/gitlab || exit 1
|
|
|
|
|
$(GO) vet $(GOFLAGS) ./store || exit 1
|
|
|
|
|
$(GO) vet $(GOFLAGS) ./utils || exit 1
|
|
|
|
|
$(GO) vet $(GOFLAGS) ./web || exit 1
|
|
|
|
|
|
|
|
|
|
ifeq ($(BUILD_ENTERPRISE_READY),true)
|
|
|
|
|
$(GO) vet $(GOFLAGS) ./enterprise/account_migration || exit 1
|
|
|
|
|
$(GO) vet $(GOFLAGS) ./enterprise/brand || exit 1
|
|
|
|
|
$(GO) vet $(GOFLAGS) ./enterprise/cluster || exit 1
|
|
|
|
|
$(GO) vet $(GOFLAGS) ./enterprise/compliance || exit 1
|
2017-05-18 15:05:57 -04:00
|
|
|
$(GO) vet $(GOFLAGS) ./enterprise/data_retention || exit 1
|
2017-06-29 15:59:12 +01:00
|
|
|
$(GO) vet $(GOFLAGS) ./enterprise/elasticsearch || exit 1
|
2017-02-09 13:39:15 -08:00
|
|
|
$(GO) vet $(GOFLAGS) ./enterprise/emoji || exit 1
|
2017-05-18 15:05:57 -04:00
|
|
|
$(GO) vet $(GOFLAGS) ./enterprise/imports || exit 1
|
2017-02-09 13:39:15 -08:00
|
|
|
$(GO) vet $(GOFLAGS) ./enterprise/ldap || exit 1
|
|
|
|
|
$(GO) vet $(GOFLAGS) ./enterprise/metrics || exit 1
|
|
|
|
|
$(GO) vet $(GOFLAGS) ./enterprise/mfa || exit 1
|
|
|
|
|
$(GO) vet $(GOFLAGS) ./enterprise/oauth/google || exit 1
|
|
|
|
|
$(GO) vet $(GOFLAGS) ./enterprise/oauth/office365 || exit 1
|
|
|
|
|
$(GO) vet $(GOFLAGS) ./enterprise/saml || exit 1
|
|
|
|
|
endif
|
|
|
|
|
|
2017-01-02 20:24:03 -05:00
|
|
|
todo:
|
2017-03-23 07:10:16 -04:00
|
|
|
@! ag --ignore Makefile --ignore-dir vendor --ignore-dir runtime --ignore-dir webapp/non_npm_dependencies/ TODO
|
|
|
|
|
@! ag --ignore Makefile --ignore-dir vendor --ignore-dir runtime --ignore-dir webapp/non_npm_dependencies/ XXX
|
|
|
|
|
@! ag --ignore Makefile --ignore-dir vendor --ignore-dir runtime --ignore-dir webapp/non_npm_dependencies/ FIXME
|
|
|
|
|
@! ag --ignore Makefile --ignore-dir vendor --ignore-dir runtime --ignore-dir webapp/non_npm_dependencies/ "FIX ME"
|
2017-01-02 20:24:03 -05:00
|
|
|
ifeq ($(BUILD_ENTERPRISE_READY),true)
|
2017-03-23 07:10:16 -04:00
|
|
|
@! ag --ignore Makefile --ignore-dir vendor --ignore-dir runtime --ignore-dir webapp/non_npm_dependencies/ TODO enterprise/
|
|
|
|
|
@! ag --ignore Makefile --ignore-dir vendor --ignore-dir runtime --ignore-dir webapp/non_npm_dependencies/ XXX enterprise/
|
|
|
|
|
@! ag --ignore Makefile --ignore-dir vendor --ignore-dir runtime --ignore-dir webapp/non_npm_dependencies/ FIXME enterprise/
|
|
|
|
|
@! ag --ignore Makefile --ignore-dir vendor --ignore-dir runtime --ignore-dir webapp/non_npm_dependencies/ "FIX ME" enterprise/
|
2017-01-02 20:24:03 -05:00
|
|
|
endif
|