summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore6
-rw-r--r--.travis.yml66
-rw-r--r--CONTRIBUTING.md3
-rw-r--r--Makefile291
-rw-r--r--doc/developer/API.md12
-rw-r--r--doc/process/documentation-guidelines.md11
-rw-r--r--doc/process/overview.md145
-rw-r--r--web/react/package.json3
8 files changed, 318 insertions, 219 deletions
diff --git a/.gitignore b/.gitignore
index fc9076e69..50cdca100 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,9 +6,11 @@ dist
npm-debug.log
web/static/js/bundle*.js
+web/static/js/bundle*.js.map
web/static/js/libs*.js
-model/version.go
-model/version.go.bak
+
+# Build Targets
+.prepare
# Compiled Object files, Static and Dynamic libs (Shared Objects)
*.o
diff --git a/.travis.yml b/.travis.yml
index 1af940d21..7e54d3335 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,42 +1,23 @@
-language: go
-go:
-- 1.4.2
-- 1.5.1
+language: generic
+sudo: required
+services:
+- docker
env:
- TRAVIS_DB=mysql
- TRAVIS_DB=postgres
before_install:
-- gem install compass
-- sudo apt-get update -qq
-- sudo apt-get remove mysql-common mysql-server-5.5 mysql-server-core-5.5 mysql-client-5.5
- mysql-client-core-5.5
-- sudo apt-get autoremove
-- sudo apt-get install libaio1
-- wget -O mysql-5.6.17.deb http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.17-debian6.0-x86_64.deb
-- sudo dpkg -i mysql-5.6.17.deb
-- sudo cp /opt/mysql/server-5.6/support-files/mysql.server /etc/init.d/mysql.server
-- sudo ln -s /opt/mysql/server-5.6/bin/* /usr/bin/
-- sudo sed -i'' 's/table_cache/table_open_cache/' /etc/mysql/my.cnf
-- sudo sed -i'' 's/log_slow_queries/slow_query_log/' /etc/mysql/my.cnf
-- sudo sed -i'' 's/basedir[^=]\+=.*$/basedir = \/opt\/mysql\/server-5.6/' /etc/mysql/my.cnf
-- sudo /etc/init.d/mysql.server start
-- sudo pip install mkdocs
-install:
-- export PATH=$PATH:$HOME/gopath/bin
-- go get github.com/tools/godep
-#- godep restore
-before_script:
-- mysql -e "CREATE DATABASE IF NOT EXISTS mattermost_test ;" -uroot
-- mysql -e "CREATE USER 'mmuser'@'%' IDENTIFIED BY 'mostest' ;" -uroot
-- mysql -e "GRANT ALL ON mattermost_test.* TO 'mmuser'@'%' ;" -uroot
-- psql -c "create database mattermost_test ;" -U postgres
-- psql -c "create user mmuser with password 'mostest' ;" -U postgres
-- psql -c 'grant all privileges on database "mattermost_test" to mmuser ;' -U postgres
-services:
-- redis-server
+ - docker run --name mattermost-mysql -e MYSQL_ROOT_PASSWORD=mostest -e MYSQL_USER=mmuser -e MYSQL_PASSWORD=mostest -e MYSQL_DATABASE=mattermost_test -d mysql:5.7
+ - docker run --name mattermost-postgres -e POSTGRES_USER=mmuser -e POSTGRES_PASSWORD=mostest -d postgres:9.4
+ - sleep 10
+ - docker exec mattermost-postgres psql -c 'create database mattermost_test ;' -U postgres
+ - docker exec mattermost-postgres psql -c 'grant all privileges on database "mattermost_test" to mmuser ;' -U postgres
+script: make dist-travis
addons:
hosts:
- 127.0.0.1 dockerhost
+before_deploy:
+ - sudo rm -rf dist/mattermost
+ - rvm 1.9.3 do gem install mime-types -v 2.6.2
deploy:
# Github releases, builds only on tags
- provider: releases
@@ -47,10 +28,9 @@ deploy:
on:
repo: mattermost/platform
tags: true
- go: 1.4.2
condition: $TRAVIS_DB = mysql
-# S3 deploy for master docker image. (latest compiled bits)
+# S3 deploy for latest master
- provider: s3
access_key_id: AKIAJCO3KJYEGWJIKDIQ
secret_access_key:
@@ -64,22 +44,4 @@ deploy:
on:
repo: mattermost/platform
branch: master
- go: 1.4.2
- condition: $TRAVIS_DB = mysql
-
-# S3 deploy for documentation
- - provider: s3
- access_key_id: AKIAJCO3KJYEGWJIKDIQ
- secret_access_key:
- secure: p66X2tJBmKgtcVyPtGgkAwW29IiRojqGA39RjCJkIWNTJ0e/9JvBOiMS2c4a7I4aOads38rsthwdaigBWagDWNH7bGsEZN7B0TszZuFAuU+XGjU5A66MIOfFfzbUg8AnByysr+XG5/bknFIrP/XhM2fbRr6gbYrFUK7TNkpgjFs5u3BzUrz2iTAV8uOpSJqKSnaf0pTZk1EywOK/X8W8ViIjc7Di3FzQcqIW9K3D27N+3rVsv8SRT1hWASVlnG6aThqqebiM8FCGCzAYVgQb3h3Wu8JT5fIz7Qo7A6siVRwNBwWwzP8HkGoinEK32Wsj/fDXk27vjpFQO/+9sV0xfcTbIZA6MnuYWF4rHOT59KcshCWCD3V0FopX57p/dtOzM9+6lxIctAT++izxWoZit/5c5A4633iY1d+RMeTko1POix6MSlxPMRHZUFwSXROgFuWWRpyD6TlUTCST9/wTTd0WDPklAAiYcnuEPW3qCnw0r0xkrA4AwWUXqXdAIwDt5bA27KcjRyY4Fofv9NxH09BNuBTXNPrvnYPZMmaKrv+HOX3NFTreuV6+5LJdhYUxYSBvSWo1jeWIQ5Q9RUdTU0PqmKpMhJKbKey/S4gxCXHg2HR8DwLCcbIZcvneF9yPEAT71YA6zpLKoPVSwWwH97huKSzjpic/RUfFXQOcgCQ=
- bucket: docs.mattermost.org
- local_dir: documentation-html
- acl: public_read
- region: us-east-1
- skip_cleanup: true
- detect_encoding: true
- on:
- repo: mattermost/platform
- branch: master
- go: 1.4.2
condition: $TRAVIS_DB = mysql
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index bd571efed..8af1d9efb 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -36,6 +36,9 @@ git checkout -b <branch name>
Please review the ["Fast, Obvious, Forgiving" experience design principles](http://www.mattermost.org/design-principles/) for Mattermost and check that your feature meets the criteria. Also, for any changes to user interface or help text, please read the changes out loud, as a quick and easy way to catch any inconsitencies
+3. For new server-side funcitonality, please include test cases that verify the code performs as you have intended
+
+
## Submitting a Pull Request
diff --git a/Makefile b/Makefile
index 573036f06..7e0687d76 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-.PHONY: all test clean build install run stop cover dist cleandb travis docker
+.PHONY: all dist dist-local dist-travis start-docker build-server package build-client test travis-init build-container stop-docker clean-docker clean nuke run stop setup-mac cleandb docker-build docker-run
GOPATH ?= $(GOPATH:)
GOFLAGS ?= $(GOFLAGS:)
@@ -21,33 +21,49 @@ endif
DIST_ROOT=dist
DIST_PATH=$(DIST_ROOT)/mattermost
-DIST_RESULTS=$(DIST_ROOT)/results
-BENCH=.
TESTS=.
DOCKERNAME ?= mm-dev
DOCKER_CONTAINER_NAME ?= mm-test
-all: travis
+all: dist-local
-travis:
- @echo building for travis
+dist: | build-server build-client test package
+ mv ./model/version.go.bak ./model/version.go
- if [ "$(TRAVIS_DB)" = "postgres" ]; then \
- sed -i'.bak' 's|mysql|postgres|g' config/config.json; \
- sed -i'.bak' 's|mmuser:mostest@tcp(dockerhost:3306)/mattermost_test?charset=utf8mb4,utf8|postgres://mmuser:mostest@dockerhost:5432/mattermost_test?sslmode=disable\&connect_timeout=10|g' config/config.json; \
+dist-local: | start-docker dist
+
+dist-travis: | travis-init build-container
+
+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; \
fi
- rm -Rf $(DIST_ROOT)
- @$(GO) clean $(GOFLAGS) -i ./...
+ @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; \
+ fi
- @cd web/react/ && npm install
- cd web/react/ && npm run build-libs
+build-server:
+ @echo Building mattermost server
- @echo Checking for style guide compliance
- cd web/react && $(ESLINT) --ext ".jsx" --ignore-pattern node_modules --quiet .
- @echo Running gofmt
+ rm -Rf $(DIST_ROOT)
+ $(GO) clean $(GOFLAGS) -i ./...
+
+ @echo GOFMT
$(eval GOFMT_OUTPUT := $(shell gofmt -d -s api/ model/ store/ utils/ manualtesting/ mattermost.go 2>&1))
@echo "$(GOFMT_OUTPUT)"
@if [ ! "$(GOFMT_OUTPUT)" ]; then \
@@ -57,20 +73,16 @@ travis:
exit 1; \
fi
- @sed -i'.bak' 's|_BUILD_NUMBER_|$(BUILD_NUMBER)|g' ./model/version.go
- @sed -i'.bak' 's|_BUILD_DATE_|$(BUILD_DATE)|g' ./model/version.go
- @sed -i'.bak' 's|_BUILD_HASH_|$(BUILD_HASH)|g' ./model/version.go
+ cp ./model/version.go ./model/version.go.bak
+ sed -i 's|_BUILD_NUMBER_|$(BUILD_NUMBER)|g' ./model/version.go
+ sed -i 's|_BUILD_DATE_|$(BUILD_DATE)|g' ./model/version.go
+ sed -i 's|_BUILD_HASH_|$(BUILD_HASH)|g' ./model/version.go
- @$(GO) build $(GOFLAGS) ./...
- @$(GO) install $(GOFLAGS) ./...
+ $(GO) build $(GOFLAGS) ./...
+ $(GO) install $(GOFLAGS) ./...
- @mkdir -p logs
-
- @$(GO) test $(GOFLAGS) -run=$(TESTS) -test.v -test.timeout=180s ./api || exit 1
- @$(GO) test $(GOFLAGS) -run=$(TESTS) -test.v -test.timeout=12s ./model || exit 1
- @$(GO) test $(GOFLAGS) -run=$(TESTS) -test.v -test.timeout=120s ./store || exit 1
- @$(GO) test $(GOFLAGS) -run=$(TESTS) -test.v -test.timeout=120s ./utils || exit 1
- @$(GO) test $(GOFLAGS) -run=$(TESTS) -test.v -test.timeout=120s ./web || exit 1
+package:
+ @ echo Packaging mattermost
mkdir -p $(DIST_PATH)/bin
cp $(GOPATH)/bin/platform $(DIST_PATH)/bin
@@ -81,13 +93,9 @@ travis:
mkdir -p $(DIST_PATH)/logs
- mkdir -p web/static/js
- cd web/react && npm run build
-
- cd web/sass-files && compass compile -e production --force
-
mkdir -p $(DIST_PATH)/web/static/js
cp -L web/static/js/*.min.js $(DIST_PATH)/web/static/js/
+ cp -L web/static/js/*.min.js.map $(DIST_PATH)/web/static/js/
cp -RL web/static/config $(DIST_PATH)/web/static
cp -RL web/static/css $(DIST_PATH)/web/static
cp -RL web/static/fonts $(DIST_PATH)/web/static
@@ -106,87 +114,74 @@ travis:
mv $(DIST_PATH)/web/static/js/bundle.min.js $(DIST_PATH)/web/static/js/bundle-$(BUILD_NUMBER).min.js
mv $(DIST_PATH)/web/static/js/libs.min.js $(DIST_PATH)/web/static/js/libs-$(BUILD_NUMBER).min.js
- @sed -i'.bak' 's|react-0.14.0.js|react-0.14.0.min.js|g' $(DIST_PATH)/web/templates/head.html
- @sed -i'.bak' 's|react-dom-0.14.0.js|react-dom-0.14.0.min.js|g' $(DIST_PATH)/web/templates/head.html
- @sed -i'.bak' 's|jquery-2.1.4.js|jquery-2.1.4.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.27.1.js|react-bootstrap-0.27.1.min.js|g' $(DIST_PATH)/web/templates/head.html
- @sed -i'.bak' 's|perfect-scrollbar-0.6.7.jquery.js|perfect-scrollbar-0.6.7.jquery.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
- @sed -i'.bak' 's|libs.min.js|libs-$(BUILD_NUMBER).min.js|g' $(DIST_PATH)/web/templates/head.html
+ sed -i'.bak' 's|react-0.14.0.js|react-0.14.0.min.js|g' $(DIST_PATH)/web/templates/head.html
+ sed -i'.bak' 's|react-dom-0.14.0.js|react-dom-0.14.0.min.js|g' $(DIST_PATH)/web/templates/head.html
+ sed -i'.bak' 's|jquery-2.1.4.js|jquery-2.1.4.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.27.1.js|react-bootstrap-0.27.1.min.js|g' $(DIST_PATH)/web/templates/head.html
+ sed -i'.bak' 's|perfect-scrollbar-0.6.7.jquery.js|perfect-scrollbar-0.6.7.jquery.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
+ sed -i'.bak' 's|libs.min.js|libs-$(BUILD_NUMBER).min.js|g' $(DIST_PATH)/web/templates/head.html
rm $(DIST_PATH)/web/templates/*.bak
- mv doc/README.md doc/index.md
- mkdocs build --strict
- cp -r documentation-html $(DIST_PATH)/documentation-html
-
tar -C dist -czf $(DIST_PATH).tar.gz mattermost
- rm -r $(DIST_PATH)
-build:
- @$(GO) build $(GOFLAGS) ./...
+build-client:
+ @echo Building mattermost web client
-install:
- @go get $(GOFLAGS) github.com/tools/godep
+ cd web/react/ && npm install
- @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 > /dev/null; \
- elif [ $(shell docker ps | grep -ci mattermost-mysql) -eq 0 ]; then \
- echo restarting mattermost-mysql; \
- docker start mattermost-mysql > /dev/null; \
- fi
+ @echo Checking for style guide compliance
- @cd web/react/ && npm install
- @cd web/react/ && npm run build-libs
+ @echo ESLint...
+ cd web/react && $(ESLINT) --ext ".jsx" --ignore-pattern node_modules --quiet .
-check: install
- @echo Running ESLint...
- -cd web/react && $(ESLINT) --ext ".jsx" --ignore-pattern node_modules .
- @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; \
+ cd web/react/ && npm run build-libs
+
+ mkdir -p web/static/js
+ cd web/react && npm run build
+
+ cd web/sass-files && compass compile -e production --force
+
+test:
+ $(GO) test $(GOFLAGS) -run=$(TESTS) -test.v -test.timeout=180s ./api || exit 1
+ $(GO) test $(GOFLAGS) -run=$(TESTS) -test.v -test.timeout=12s ./model || exit 1
+ $(GO) test $(GOFLAGS) -run=$(TESTS) -test.v -test.timeout=120s ./store || exit 1
+ $(GO) test $(GOFLAGS) -run=$(TESTS) -test.v -test.timeout=120s ./utils || exit 1
+ $(GO) test $(GOFLAGS) -run=$(TESTS) -test.v -test.timeout=120s ./web || exit 1
+
+travis-init:
+ @echo Setting up enviroment for travis
+
+ if [ "$(TRAVIS_DB)" = "postgres" ]; then \
+ sed -i'.bak' 's|mysql|postgres|g' config/config.json; \
+ sed -i'.bak' 's|mmuser:mostest@tcp(dockerhost:3306)/mattermost_test?charset=utf8mb4,utf8|postgres://mmuser:mostest@postgres:5432/mattermost_test?sslmode=disable\&connect_timeout=10|g' config/config.json; \
fi
-test: install
- @mkdir -p logs
- @$(GO) test $(GOFLAGS) -run=$(TESTS) -test.v -test.timeout=600s ./api || exit 1
- @$(GO) test $(GOFLAGS) -run=$(TESTS) -test.v -test.timeout=60s ./model || exit 1
- @$(GO) test $(GOFLAGS) -run=$(TESTS) -test.v -test.timeout=600s ./store || exit 1
- @$(GO) test $(GOFLAGS) -run=$(TESTS) -test.v -test.timeout=600s ./utils || exit 1
- @$(GO) test $(GOFLAGS) -run=$(TESTS) -test.v -test.timeout=600s ./web || exit 1
+ if [ "$(TRAVIS_DB)" = "mysql" ]; then \
+ sed -i'.bak' 's|mmuser:mostest@tcp(dockerhost:3306)/mattermost_test?charset=utf8mb4,utf8|mmuser:mostest@tcp(mysql:3306)/mattermost_test?charset=utf8mb4,utf8|g' config/config.json; \
+ fi
-benchmark: install
- @mkdir -p logs
- @$(GO) test $(GOFLAGS) -test.v -run=NO_TESTS -bench=$(BENCH) ./api || exit 1
+build-container:
+ @echo Building in container
-cover: install
- rm -Rf $(DIST_RESULTS)
- mkdir -p $(DIST_RESULTS)
+ docker run --link mattermost-mysql:mysql --link mattermost-postgres:postgres -v `pwd`:/go/src/github.com/mattermost/platform mattermost/builder:latest
- @$(GO) test $(GOFLAGS) -coverprofile=$(DIST_RESULTS)/api.cover.out github.com/mattermost/platform/api
- @$(GO) test $(GOFLAGS) -coverprofile=$(DIST_RESULTS)/model.cover.out github.com/mattermost/platform/model
- @$(GO) test $(GOFLAGS) -coverprofile=$(DIST_RESULTS)/store.cover.out github.com/mattermost/platform/store
- @$(GO) test $(GOFLAGS) -coverprofile=$(DIST_RESULTS)/utils.cover.out github.com/mattermost/platform/utils
- @$(GO) test $(GOFLAGS) -coverprofile=$(DIST_RESULTS)/web.cover.out github.com/mattermost/platform/web
+stop-docker:
+ @echo Stopping docker containers
- cd $(DIST_RESULTS) && \
- echo "mode: set" > coverage.out && cat *.cover.out | grep -v mode: | sort -r | \
- awk '{if($$1 != last) {print $$0;last=$$1}}' >> coverage.out
+ @if [ $(shell docker ps -a | grep -ci mattermost-mysql) -eq 1 ]; then \
+ echo stopping mattermost-mysql; \
+ docker stop mattermost-mysql > /dev/null; \
+ fi
- cd $(DIST_RESULTS) && $(GO) tool cover -html=coverage.out -o=coverage.html
+ @if [ $(shell docker ps -a | grep -ci mattermost-postgres) -eq 1 ]; then \
+ echo stopping mattermost-postgres; \
+ docker stop mattermost-postgres > /dev/null; \
+ fi
- rm -f $(DIST_RESULTS)/*.cover.out
-
-clean:
- rm -Rf $(DIST_ROOT)
- @$(GO) clean $(GOFLAGS) -i ./...
+clean-docker:
+ @echo Removing docker containers
@if [ $(shell docker ps -a | grep -ci mattermost-mysql) -eq 1 ]; then \
echo stopping mattermost-mysql; \
@@ -194,29 +189,55 @@ clean:
docker rm -v mattermost-mysql > /dev/null; \
fi
+ @if [ $(shell docker ps -a | grep -ci mattermost-postgres) -eq 1 ]; then \
+ echo stopping mattermost-postgres; \
+ docker stop mattermost-postgres > /dev/null; \
+ docker rm -v mattermost-postgres > /dev/null; \
+ fi
+
+clean: stop-docker
+ rm -Rf $(DIST_ROOT)
+ go clean $(GOFLAGS) -i ./...
+
rm -rf web/react/node_modules
rm -f web/static/js/bundle*.js
+ rm -f web/static/js/bundle*.js.map
rm -f web/static/js/libs*.js
rm -f web/static/css/styles.css
- rm -rf data/*
- rm -rf api/data/*
- rm -rf logs/*
+ rm -rf data
+ rm -rf api/data
+ rm -rf logs
+ rm -rf web/sass-files/.sass-cache
rm -rf Godeps/_workspace/pkg/
+ rm -f mattermost.log
+ rm -f .prepare
+
+nuke: | clean clean-docker
+
+.prepare:
+ @echo Preparation for run step
+
+ go get $(GOFLAGS) github.com/tools/godep
+
+ cd web/react/ && npm install
+ cd web/react/ && npm run build-libs
+
+ touch $@
-run: install
+run: start-docker .prepare
mkdir -p web/static/js
- @echo starting react processor
- @cd web/react && npm start &
+ @echo Starting react processor
+ cd web/react && npm start &
- @echo starting go web server
- @$(GO) run $(GOFLAGS) mattermost.go -config=config.json &
+ @echo Starting go web server
+ $(GO) run $(GOFLAGS) mattermost.go -config=config.json &
- @echo starting compass watch
- @cd web/sass-files && compass watch &
+ @echo Starting compass watch
+ cd web/sass-files && compass watch &
stop:
@for PID in $$(ps -ef | grep [c]ompass | awk '{ print $$2 }'); do \
@@ -248,60 +269,6 @@ cleandb:
docker stop mattermost-mysql > /dev/null; \
docker rm -v mattermost-mysql > /dev/null; \
fi
-dist: install
-
- @sed -i'.bak' 's|_BUILD_NUMBER_|$(BUILD_NUMBER)|g' ./model/version.go
- @sed -i'.bak' 's|_BUILD_DATE_|$(BUILD_DATE)|g' ./model/version.go
- @sed -i'.bak' 's|_BUILD_HASH_|$(BUILD_HASH)|g' ./model/version.go
-
- @$(GO) build $(GOFLAGS) -i ./...
- @$(GO) install $(GOFLAGS) ./...
-
- mkdir -p $(DIST_PATH)/bin
- cp $(GOPATH)/bin/platform $(DIST_PATH)/bin
-
- cp -RL config $(DIST_PATH)/config
- touch $(DIST_PATH)/config/build.txt
- echo $(BUILD_NUMBER) | tee -a $(DIST_PATH)/config/build.txt
-
- mkdir -p $(DIST_PATH)/logs
-
- mkdir -p web/static/js
- cd web/react && npm run build
-
- cd web/sass-files && compass compile -e production --force
-
- mkdir -p $(DIST_PATH)/web/static/js
- cp -L web/static/js/*.min.js $(DIST_PATH)/web/static/js/
- cp -RL web/static/config $(DIST_PATH)/web/static
- cp -RL web/static/css $(DIST_PATH)/web/static
- cp -RL web/static/fonts $(DIST_PATH)/web/static
- cp -RL web/static/help $(DIST_PATH)/web/static
- cp -RL web/static/images $(DIST_PATH)/web/static
- cp -RL web/static/js/jquery-dragster $(DIST_PATH)/web/static/js/
- cp -RL web/templates $(DIST_PATH)/web
-
- mkdir -p $(DIST_PATH)/api
- cp -RL api/templates $(DIST_PATH)/api
-
- cp build/MIT-COMPILED-LICENSE.md $(DIST_PATH)
- cp NOTICE.txt $(DIST_PATH)
- cp README.md $(DIST_PATH)
-
- mv $(DIST_PATH)/web/static/js/bundle.min.js $(DIST_PATH)/web/static/js/bundle-$(BUILD_NUMBER).min.js
- mv $(DIST_PATH)/web/static/js/libs.min.js $(DIST_PATH)/web/static/js/libs-$(BUILD_NUMBER).min.js
-
- @sed -i'.bak' 's|react-0.14.0.js|react-0.14.0.min.js|g' $(DIST_PATH)/web/templates/head.html
- @sed -i'.bak' 's|react-dom-0.14.0.js|react-dom-0.14.0.min.js|g' $(DIST_PATH)/web/templates/head.html
- @sed -i'.bak' 's|jquery-2.1.4.js|jquery-2.1.4.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.27.1.js|react-bootstrap-0.27.1.min.js|g' $(DIST_PATH)/web/templates/head.html
- @sed -i'.bak' 's|perfect-scrollbar-0.6.7.jquery.js|perfect-scrollbar-0.6.7.jquery.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
- @sed -i'.bak' 's|libs.min.js|libs-$(BUILD_NUMBER).min.js|g' $(DIST_PATH)/web/templates/head.html
- rm $(DIST_PATH)/web/templates/*.bak
-
- tar -C dist -czf $(DIST_PATH).tar.gz mattermost
docker-build: stop
docker build -t ${DOCKERNAME} -f docker/local/Dockerfile .
diff --git a/doc/developer/API.md b/doc/developer/API.md
index e5e5db2ba..1be3669ab 100644
--- a/doc/developer/API.md
+++ b/doc/developer/API.md
@@ -33,3 +33,15 @@ Mattermost drivers offer access to the Mattermost web service API in different l
### [Golang Driver](https://github.com/mattermost/platform/blob/master/model/client.go)
[client.go](https://github.com/mattermost/platform/blob/master/model/client.go) - This is a RESTful driver connecting with the Golang-based webservice of Mattermost and is used by unit tests.
+
+## Building API Integration
+
+If you're building a deep integration with Mattermost, for example a mobile native client, and there is a driver available to support the programming language you are using, it's best to use the driver available to access the [Mattermost Web Service APIs](API-Web-Service.md).
+
+If no driver is available for the programming language of your choice, you can view the [Golang Driver](https://github.com/mattermost/platform/blob/master/model/client.go) source code to understand how it exercises the Web Service API. You can also learn more by reviewing open source projects that use the Web Service API, like [matterircd](https://github.com/42wim/matterircd).
+
+There are a wide range of [installation guides](www.mattermost.org/installation/) for setting up your own Mattermost server on which to develop and test your integrations.
+
+
+
+
diff --git a/doc/process/documentation-guidelines.md b/doc/process/documentation-guidelines.md
index e75bb3169..cbfeec850 100644
--- a/doc/process/documentation-guidelines.md
+++ b/doc/process/documentation-guidelines.md
@@ -86,14 +86,21 @@ For readability and clear layout, end a sub-section heading with a colon
##### Correct:
----
+
Service Based:
+
- [AWS Elastic Beanstalk Setup](https://github.com/mattermost/platform/blob/master/doc/install/Amazon-Elastic-Beanstalk.md)
+
----
##### Incorrect:
----
-Optional
-- [Community Guide for Production Debian Setup](https://github.com/mattermost/platform/blob/master/doc/install/Production-Debian.md)
+
+Service Based
+
+- [AWS Elastic Beanstalk Setup](https://github.com/mattermost/platform/blob/master/doc/install/Amazon-Elastic-Beanstalk.md)
+
+
----
### One instruction per line
diff --git a/doc/process/overview.md b/doc/process/overview.md
new file mode 100644
index 000000000..ca15de3a7
--- /dev/null
+++ b/doc/process/overview.md
@@ -0,0 +1,145 @@
+# Development Process Overview
+
+This document describes the process through which feedback and design discussions flow into community systems, then into tickets, then into merge requests, then into monthly releases based on the purpose of the product.
+
+## Purpose
+
+The core offer for users of Mattermost is:
+
+- **All your team communication in one place, searchable and accessible anywhere.**
+
+The design is successful if 100% of team members use Mattermost for internal communications, and are largely off of email and propreitary SaaS products that lock-in user data as part of their business model.
+
+See [Mattermost scope statement](http://www.mattermost.org/vision/#mattermost-teams-v1) for more details.
+
+## Community Systems
+
+The process for managing bugs, feature ideas, troubleshooting, and general discussions are different, so different systems are used to best support each process. Each system ties into Mattermost through notifications to internal channels, so the core team and key contributors can keep up-to-date with community feedback across all systems throughout the day.
+
+Systems include:
+
+### Feature Idea Forum
+
+A forum for filing, upvoting and discussing feature ideas. Reviewed monthly by the core team as part of the planning process for new releases.
+
+See [Contributing Feature Ideas](http://www.mattermost.org/feature-requests/) for more details on how to use this system.
+
+_Note: If you want to promote an idea filed in the feature idea forum, or if you are out of votes and want to find like-minded colleagues to vote for you, consider posting to the [Feature Idea Discussion ](https://forum.mattermost.org/t/how-to-use-feature-idea-discussion/63/1) category in the General Forum._
+
+
+### Troubleshooting Forum
+
+A system for peer-to-peer support of installation and configuration questions.
+
+See [Troubleshooting Forum](https://forum.mattermost.org/t/about-the-trouble-shooting-category/150/1).
+
+
+### GitHub Issues
+
+A system used by Mattermost for reporting bugs with clear statements on repro steps and expected behavior.
+
+See [Filing Issues](http://www.mattermost.org/filing-issues/) for details on how to use this system.
+
+For feature ideas, troubleshooting, or general questions, we ask your help to use the appropriate [Community System](https://github.com/mattermost/platform/blob/master/doc/process/overview.md#community-systems).
+
+### GitHub Pull Requests
+
+A system for submitting merge requests for changes to Mattermost. See [Merge Requests](https://github.com/mattermost/platform/blob/master/doc/process/overview.md#merge-requests) section below.
+
+### General Forum
+
+A general, peer-to-peer discussion forum with topics organized by category for general questions, trouble shooting, design feedback requests, and FAQs. Monitored and moderated by core team, which is also active on the forum.
+
+Read more about the [General Forum](https://forum.mattermost.org/t/welcome-to-mattermost-community-discussion/8).
+
+### Primary Research
+
+Core team members and key contributors may discuss Mattermost directly with users in a range of systems outside those listed here--in-person meetings, video-conference, usability testing, Twitter, email, etc. Those notes are shared in various Mattermost channels to inform designs.
+
+## Tickets
+
+Mattermost priorities are managed in Jira tickets, which are created by the core team via feedback from community systems as well as through the planning processes.
+
+### Triage
+
+On non-holiday weekdays new tickets are reviewed in a process called "triage", and assigned a Fix Version of "backlog", indicating the ticket has enough specificity that it can be assigned to a developer to be completed.
+
+By default, all tickets are created as internal-only, and the triage process reviews them for sufficient specifity and abscense of sensitive information before switching their visibility to public as part of the triage process.
+
+View [current issues scheduled for the next triage meeting](https://mattermost.atlassian.net/browse/PLT-1203?filter=10105).
+
+#### Re-triage
+
+If someone feels an existing ticket should be reexamined, they can add "triage" to the Fix Version and it will be routed to the triage team for review at the next meeting.
+
+### Release Planning
+
+Release planning sets the "Fix Version" of tickets to one of the upcoming monthly releases. The Fix Version is an estimate of when a feature might ship, which may change as the planning process continues, until the ticket is scheduled for a Sprint.
+
+### Sprint Planning
+
+Tickets to be completed in the upcoming two weeks are organized on Tuesdays, with input from developers, and finalized on Fridays.
+
+## Merge Requests
+
+### Core Team Weekly Rhythm
+
+Core team work on tickets in the active sprint on a weekly basis, which flow into GitHub Pull Requests.
+
+Each Pull Request needs a minimum of two reviews by other core team developers before it is merged, with possible feedback shared as reviews happen.
+
+Key contributors might also pick up tickets, or through conversations with the core team contribute pull requests as needed.
+
+### Community Contributions
+
+Community members following the Contribution Guidelines might also submit pull requests.
+
+#### Bug Fixes
+
+If you see an obvious bug and want to submit a fix, pull requests following the [contribution guidelines](https://github.com/mattermost/platform/blob/master/CONTRIBUTING.md) are gladly accepted.
+
+Examples:
+- [Fix: Unable to change password #1390](https://github.com/mattermost/platform/pull/1390)
+- [Fix isBrowserEdge typo #1260](https://github.com/mattermost/platform/pull/1260)
+
+#### Tickets Accepting Pull Requests
+
+If you'd like to improve the product beyond bug fixes, you can select from a list of tickets accepting pull requests prepared by the core team.
+
+Tickets labelled "accepting pull requests" are intended to be unambiguous projects that could be reasonably completed by contributors outside the core team and are welcome contributions.
+
+Tickets may have a "mana" value assigned, which is an estimate of the relative complexity of each ticket (2 is "small", "4" is medium, "8" is large).
+
+Even if the ticket is assigned to someone else, so long as the ticket has Status set to Open and the ticket is not in the [Active Sprint](https://mattermost.atlassian.net/browse/PLT-839?jql=status%20%3D%20Open%20AND%20sprint%20in%20openSprints%20()) contributors following the contribution guidelines are welcome to submit pull requests.
+
+For a list of tickets that meet this criteria, please the list of [Tickets Accepting Pull Requests](https://mattermost.atlassian.net/browse/PLT-1263?filter=10101).
+
+#### Documentation Improvements
+
+Improvements to documentation on master is highly welcome.
+
+Please see [documentation contribution guidelines](https://forum.mattermost.org/t/help-improve-mattermost-documentation/194) for more details.
+
+Examples:
+- [Production installation instructions for Debian Jessie with Systemd #1134](https://github.com/mattermost/platform/pull/1134)
+- [Fix deadlink to AWS file in doc #622]( https://github.com/mattermost/platform/pull/622)
+
+#### Minor Improvements
+
+Minor improvements without an Accepting Pull Request ticket may be accepted if:
+
+1. The contribution aligns with product scope
+2. The change is high quality, and does not impose a significant burden for others to test, document and maintain your change.
+3. The change aligns with the [fast, obvious, forgiving](http://www.mattermost.org/design-principles/) design principle.
+
+Examples:
+- [Do not clear LastActivityAt for GetProfiles #1396](https://github.com/mattermost/platform/pull/1396/files)
+- [Update to proxy_pass #1331](https://github.com/mattermost/platform/pull/1331)
+
+In general, it's
+
+## Release
+
+Mattermost ships stable releases on the 16th of the month. Releases begin with a planning process reviewing internal designs and community feedback in the context of the product purpose. Feature development is done in weekly sprints, and releases end with feature complete, stablization, code complete and release candidate milestones prior to final release.
+
+See [release process documentation](https://github.com/mattermost/platform/blob/master/doc/process/release-process.md) for more details.
diff --git a/web/react/package.json b/web/react/package.json
index b63fe35fb..41b2468af 100644
--- a/web/react/package.json
+++ b/web/react/package.json
@@ -22,13 +22,14 @@
"watchify": "3.6.1",
"eslint": "1.9.0",
"eslint-plugin-react": "3.9.0",
+ "exorcist": "0.4.0",
"babel-eslint": "4.1.5"
},
"scripts": {
"check": "",
"build-libs": "browserify -r crypto -r autolinker -r flux -r keymirror -r marked -r object-assign -r twemoji | uglifyjs -c -m --screw-ie8 > ../static/js/libs.min.js",
"start": "watchify --fast -x crypto -x node -x autolinker -x flux -x keymirror -x marked -x object-assign -x twemoji -o ../static/js/bundle.js -v -d ./**/*.jsx",
- "build": "browserify -x crypto -x autolinker -x flux -x keymirror -x marked -x object-assign -x twemoji ./**/*.jsx | uglifyjs -c -m --screw-ie8 > ../static/js/bundle.min.js"
+ "build": "browserify -x crypto -x autolinker -x flux -x keymirror -x marked -x object-assign -x twemoji -d ./**/*.jsx | exorcist ../static/js/inter.js.map > ../static/js/tmp.js && uglifyjs ../static/js/tmp.js --in-source-map \"../static/js/inter.js.map\" --source-map \"../static/js/bundle.min.js.map\" --source-map-url \"/static/js/bundle.min.js.map\" -c -m --screw-ie8 > ../static/js/bundle.min.js && rm ../static/js/tmp.js && rm ../static/js/inter.js.map"
},
"browserify": {
"transform": [