diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 36 |
1 files changed, 29 insertions, 7 deletions
@@ -39,9 +39,18 @@ travis: @echo Checking for style guide compliance cd web/react && $(ESLINT) --quiet components/* dispatcher/* pages/* stores/* utils/* + @echo Running gofmt + $(eval GOFMT_OUTPUT := $(shell gofmt -d -s api/ model/ store/ utils/ manualtesting/ mattermost.go 2>&1)) + @echo "$(GOFMT_OUTPUT)" + @if [ ! "$(GOFMT_OUTPUT)" ]; then \ + echo "gofmt sucess"; \ + else \ + echo "gofmt failure"; \ + exit 1; \ + fi @$(GO) build $(GOFLAGS) ./... - @$(GO) install $(GOFLAGS) -a ./... + @$(GO) install $(GOFLAGS) ./... @mkdir -p logs @@ -78,9 +87,10 @@ travis: mv $(DIST_PATH)/web/static/js/bundle.min.js $(DIST_PATH)/web/static/js/bundle-$(BUILD_NUMBER).min.js - @sed -i'.bak' 's|react-with-addons-0.13.1.js|react-with-addons-0.13.1.min.js|g' $(DIST_PATH)/web/templates/head.html + @sed -i'.bak' 's|react-with-addons-0.13.3.js|react-with-addons-0.13.3.min.js|g' $(DIST_PATH)/web/templates/head.html @sed -i'.bak' 's|jquery-1.11.1.js|jquery-1.11.1.min.js|g' $(DIST_PATH)/web/templates/head.html - @sed -i'.bak' 's|bootstrap-3.3.1.js|bootstrap-3.3.1.min.js|g' $(DIST_PATH)/web/templates/head.html + @sed -i'.bak' 's|bootstrap-3.3.5.js|bootstrap-3.3.5.min.js|g' $(DIST_PATH)/web/templates/head.html + @sed -i'.bak' 's|react-bootstrap-0.25.1.js|react-bootstrap-0.25.1.min.js|g' $(DIST_PATH)/web/templates/head.html @sed -i'.bak' 's|perfect-scrollbar.js|perfect-scrollbar.min.js|g' $(DIST_PATH)/web/templates/head.html @sed -i'.bak' 's|bundle.js|bundle-$(BUILD_NUMBER).min.js|g' $(DIST_PATH)/web/templates/head.html rm $(DIST_PATH)/web/templates/*.bak @@ -107,6 +117,15 @@ install: check: install @echo Running ESLint... -cd web/react && $(ESLINT) components/* dispatcher/* pages/* stores/* utils/* + @echo Running gofmt + $(eval GOFMT_OUTPUT := $(shell gofmt -d -s api/ model/ store/ utils/ manualtesting/ mattermost.go 2>&1)) + @echo "$(GOFMT_OUTPUT)" + @if [[ ! "$(GOFMT_OUTPUT)" ]]; then \ + echo "gofmt sucess"; \ + else \ + echo "gofmt failure"; \ + exit 1; \ + fi test: install @mkdir -p logs @@ -156,6 +175,8 @@ clean: rm -rf api/data/* rm -rf logs/* + rm -rf Godeps/_workspace/pkg/ + run: install mkdir -p web/static/js @@ -201,8 +222,8 @@ cleandb: fi dist: install - @$(GO) build $(GOFLAGS) -i -a ./... - @$(GO) install $(GOFLAGS) -a ./... + @$(GO) build $(GOFLAGS) -i ./... + @$(GO) install $(GOFLAGS) ./... mkdir -p $(DIST_PATH)/bin cp $(GOPATH)/bin/platform $(DIST_PATH)/bin @@ -231,9 +252,10 @@ dist: install mv $(DIST_PATH)/web/static/js/bundle.min.js $(DIST_PATH)/web/static/js/bundle-$(BUILD_NUMBER).min.js - @sed -i'.bak' 's|react-with-addons-0.13.1.js|react-with-addons-0.13.1.min.js|g' $(DIST_PATH)/web/templates/head.html + @sed -i'.bak' 's|react-with-addons-0.13.3.js|react-with-addons-0.13.3.min.js|g' $(DIST_PATH)/web/templates/head.html @sed -i'.bak' 's|jquery-1.11.1.js|jquery-1.11.1.min.js|g' $(DIST_PATH)/web/templates/head.html - @sed -i'.bak' 's|bootstrap-3.3.1.js|bootstrap-3.3.1.min.js|g' $(DIST_PATH)/web/templates/head.html + @sed -i'.bak' 's|bootstrap-3.3.5.js|bootstrap-3.3.5.min.js|g' $(DIST_PATH)/web/templates/head.html + @sed -i'.bak' 's|react-bootstrap-0.25.1.js|react-bootstrap-0.25.1.min.js|g' $(DIST_PATH)/web/templates/head.html @sed -i'.bak' 's|perfect-scrollbar.js|perfect-scrollbar.min.js|g' $(DIST_PATH)/web/templates/head.html @sed -i'.bak' 's|bundle.js|bundle-$(BUILD_NUMBER).min.js|g' $(DIST_PATH)/web/templates/head.html rm $(DIST_PATH)/web/templates/*.bak |