Skip to content

Commit

Permalink
PLT-8131 Bundled zoom plugin (mattermost#7947)
Browse files Browse the repository at this point in the history
* Bundled zoom plugin

* Update plugin to latest
  • Loading branch information
jwilander authored Dec 5, 2017
1 parent c171872 commit 150de58
Show file tree
Hide file tree
Showing 7 changed files with 730 additions and 2 deletions.
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
4 changes: 3 additions & 1 deletion app/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,15 @@ 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"
)

var prepackagedPlugins map[string]func(string) ([]byte, error) = map[string]func(string) ([]byte, error){
"jira": jira.Asset,
"zoom": zoom.Asset,
}

func (a *App) initBuiltInPlugins() {
Expand Down Expand Up @@ -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())
}
Expand Down
10 changes: 10 additions & 0 deletions app/plugin/zoom/plugin.go
Original file line number Diff line number Diff line change
@@ -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
}
235 changes: 235 additions & 0 deletions app/plugin/zoom/plugin_darwin_amd64.go

Large diffs are not rendered by default.

235 changes: 235 additions & 0 deletions app/plugin/zoom/plugin_linux_amd64.go

Large diffs are not rendered by default.

235 changes: 235 additions & 0 deletions app/plugin/zoom/plugin_windows_amd64.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion scripts/license-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.
;;
*)
Expand Down

0 comments on commit 150de58

Please sign in to comment.