No description
This repository has been archived on 2024-11-03. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
Find a file
Jesse Hallam 2de3471aa2
more Makefile improvements
* warn upfront if go/dep/npm not available
* try to find dep in $GOPATH/bin if not installed globally
* only override variables if not externally defined, allowing manual override from command line
* split up Makefile into a buid/setup.mk for simplicity

I didn't actually find anything that made this Makefile not-linux
specific -- tested on Debian with the standard make installed.
2018-07-31 16:15:55 -04:00
build more Makefile improvements 2018-07-31 16:15:55 -04:00
server s/vgo/dep/ 2018-07-27 14:32:36 -04:00
webapp tweak plugin_id.js generation 2018-07-24 16:06:31 -04:00
.gitignore initial commit 2018-07-23 13:43:22 -04:00
CHANGELOG.md initial commit 2018-07-23 13:43:22 -04:00
LICENSE initial commit 2018-07-23 13:43:22 -04:00
Makefile more Makefile improvements 2018-07-31 16:15:55 -04:00
plugin.json strip out sample bits (moved to demo repository) 2018-07-24 16:02:46 -04:00
README.md update README.md, description to reflect sample nature of repository 2018-07-24 15:45:28 -04:00

Sample Plugin

This plugin serves as a starting point for writing a Mattermost plugin. Feel free to base your own plugin off this repository.

Getting Started

Shallow clone the repository to a directory matching your plugin name:

git clone --depth 1 https://github.com/mattermost/mattermost-plugin-sample com.example.my-plugin

Edit plugin.json with your id, name, and description:

{
    "id": "com.example.my-plugin",
    "name": "My Plugin",
    "description": "A plugin to enhance Mattermost."
}

Build your plugin:

make

This will produce a single plugin file (with support for multiple architectures) for upload to your Mattermost server:

dist/com.example.my-plugin.tar.gz

There is a build target to automate deploying and enabling the plugin to your server, but it requires configuration and http to be installed:

export MM_SERVICESETTINGS_SITEURL=http://localhost:8065/
export MM_ADMIN_USERNAME=admin
export MM_ADMIN_PASSWORD=password
make deploy

Alternatively, if you are running your mattermost-server out of a sibling directory by the same name, use the deploy target alone to unpack the files into the right directory. You will need to restart your server and manually enable your plugin.

In production, deploy and upload your plugin via the System Console.

Q&A

How do I make a server-only or web app-only plugin?

Simply delete the server or webapp folders and remove the corresponding sections from plugin.json. The build scripts will skip the missing portions automatically.