PLT-8131 Bundled zoom plugin (#7947)

* Bundled zoom plugin

* Update plugin to latest
This commit is contained in:
Joram Wilander
2017-12-05 16:35:46 -05:00
committed by GitHub
parent c171872472
commit 150de584c3
7 changed files with 730 additions and 2 deletions

View File

@@ -286,6 +286,17 @@ update-jira-plugin:
rm plugin.tar.gz
gofmt -s -w ./app/plugin/jira
update-zoom-plugin:
go get github.com/jteeuwen/go-bindata/...
curl -s https://api.github.com/repos/mattermost/mattermost-plugin-zoom/releases/latest | grep browser_download_url | grep darwin-amd64 | cut -d '"' -f 4 | wget -qi - -O plugin.tar.gz
$(shell go env GOPATH)/bin/go-bindata -pkg zoom -o app/plugin/zoom/plugin_darwin_amd64.go plugin.tar.gz
curl -s https://api.github.com/repos/mattermost/mattermost-plugin-zoom/releases/latest | grep browser_download_url | grep linux-amd64 | cut -d '"' -f 4 | wget -qi - -O plugin.tar.gz
$(shell go env GOPATH)/bin/go-bindata -pkg zoom -o app/plugin/zoom/plugin_linux_amd64.go plugin.tar.gz
curl -s https://api.github.com/repos/mattermost/mattermost-plugin-zoom/releases/latest | grep browser_download_url | grep windows-amd64 | cut -d '"' -f 4 | wget -qi - -O plugin.tar.gz
$(shell go env GOPATH)/bin/go-bindata -pkg zoom -o app/plugin/zoom/plugin_windows_amd64.go plugin.tar.gz
rm plugin.tar.gz
gofmt -s -w ./app/plugin/zoom
check-licenses:
./scripts/license-check.sh $(TE_PACKAGES) $(EE_PACKAGES)

View File

@@ -22,6 +22,7 @@ import (
builtinplugin "github.com/mattermost/mattermost-server/app/plugin"
"github.com/mattermost/mattermost-server/app/plugin/jira"
"github.com/mattermost/mattermost-server/app/plugin/ldapextras"
"github.com/mattermost/mattermost-server/app/plugin/zoom"
"github.com/mattermost/mattermost-server/plugin"
"github.com/mattermost/mattermost-server/plugin/pluginenv"
@@ -29,6 +30,7 @@ import (
var prepackagedPlugins map[string]func(string) ([]byte, error) = map[string]func(string) ([]byte, error){
"jira": jira.Asset,
"zoom": zoom.Asset,
}
func (a *App) initBuiltInPlugins() {
@@ -377,7 +379,7 @@ func (a *App) InitPlugins(pluginPath, webappPath string) {
if _, err := a.installPlugin(bytes.NewReader(tarball), true); err != nil {
l4g.Error("failed to install prepackaged plugin: " + err.Error())
}
if _, ok := a.Config().PluginSettings.PluginStates[id]; !ok {
if _, ok := a.Config().PluginSettings.PluginStates[id]; !ok && id != "zoom" {
if err := a.EnablePlugin(id); err != nil {
l4g.Error("failed to enable prepackaged plugin: " + err.Error())
}

10
app/plugin/zoom/plugin.go Normal file
View File

@@ -0,0 +1,10 @@
// Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
// +build !amd64 !darwin,!linux,!windows
package zoom
func Asset(name string) ([]byte, error) {
return nil, nil
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -5,7 +5,7 @@ count=0
for fileType in GoFiles; do
for file in `go list -f $'{{range .GoFiles}}{{$.Dir}}/{{.}}\n{{end}}' "$@"`; do
case $file in
*/utils/lru.go|*/store/storetest/mocks/*|*/app/plugin/jira/plugin_*)
*/utils/lru.go|*/store/storetest/mocks/*|*/app/plugin/jira/plugin_*|*/app/plugin/zoom/plugin_*)
# Third-party, doesn't require a header.
;;
*)