Customizations to the Mattermost Web App can be performed in cases where you need to customize branding, alter localization strings, or fulfill security requirements that are not immediately offered out-of-the-box.
With that in mind, customizing and deploying your Mattermost Web App can be done in a few steps:
git clone https://github.com/<yourgithubusername>/mattermost-webapp
masterbranch (more details about that in the next section regarding rebasing).
git checkout -b custom_branch
Perform customization tasks by replacing image assets, changing strings, altering the UI, and whatever else may be necessary. Be mindful not to violate any of the guidelines on trademark use during this process.
Once customization has been completed, build the files that will be used in your deployment.
cd dist tar -cvf dist.tar *
clientdirectory (assuming Mattermost was deployed in the
cd ~/mattermost/client && rm -rf *
distfiles inside Mattermost’s
clientdirectory, and decompress it.
tar -xvf dist.tar
Challenges arise when creating a separate custom branch from an active open-source project like
mattermost-webapp. As the project gets new commits and pull requests on a daily basis, your custom webapp can quickly become outdated.
To deal with that, you’ll need to leverage Git’s interactive rebasing functionality in the following way:
git remote add upstream https://github.com/mattermost/mattermost-webapp.git
masterbranch to latest upstream commit.
git checkout master git pull upstream master
git checkout custom_branch git rebase -i master
git rebase --continue after resolving any conflicts that arise during rebase process
forcepush. Be sure you’ve tested that your rebase was successful before completing this last command).
git push -f origin custom_branch