diff options
author | Carlos Tadeu Panato Junior <ctadeu@gmail.com> | 2018-07-16 17:02:13 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-16 17:02:13 +0200 |
commit | 940d0bbbc2d8f2778811641e45f8a90a88682786 (patch) | |
tree | 067679c43b10214117f7acf4a12cd55f77bebdaa | |
parent | 9d9fcd9ac5d10a6ff1050477d527385d6af2f6bf (diff) | |
download | chat-940d0bbbc2d8f2778811641e45f8a90a88682786.tar.gz chat-940d0bbbc2d8f2778811641e45f8a90a88682786.tar.bz2 chat-940d0bbbc2d8f2778811641e45f8a90a88682786.zip |
add pre-package plugins to the MM package (#9114)
-rw-r--r-- | Makefile | 3 | ||||
-rw-r--r-- | build/release.mk | 22 |
2 files changed, 25 insertions, 0 deletions
@@ -72,6 +72,9 @@ TESTFLAGSEE ?= -short TE_PACKAGES=$(shell go list ./...) TE_PACKAGES_COMMA=$(shell echo $(TE_PACKAGES) | tr ' ' ',') +# Plugins Packages +PLUGIN_PACKAGES=mattermost-plugin-zoom mattermost-plugin-jira + # Prepares the enterprise build if exists. The IGNORE stuff is a hack to get the Makefile to execute the commands outside a target ifeq ($(BUILD_ENTERPRISE_READY),true) IGNORE:=$(shell echo Enterprise build selected, preparing) diff --git a/build/release.mk b/build/release.mk index 9a4115600..c3bff4ddb 100644 --- a/build/release.mk +++ b/build/release.mk @@ -29,6 +29,7 @@ package: @# Create needed directories mkdir -p $(DIST_PATH)/bin mkdir -p $(DIST_PATH)/logs + mkdir -p $(DIST_PATH)/prepackaged_plugins @# Resource directories cp -RL config $(DIST_PATH) @@ -66,39 +67,60 @@ endif ifeq ($(BUILDER_GOOS_GOARCH),"darwin_amd64") cp $(GOPATH)/bin/mattermost $(DIST_PATH)/bin # from native bin dir, not cross-compiled cp $(GOPATH)/bin/platform $(DIST_PATH)/bin # from native bin dir, not cross-compiled + @for plugin_package in $(PLUGIN_PACKAGES) ; do \ + curl -s https://api.github.com/repos/mattermost/$$plugin_package/releases/latest | grep browser_download_url | grep darwin | cut -d '"' -f 4 | wget -qi - -P $(DIST_PATH)/prepackaged_plugins/ ;\ + done else cp $(GOPATH)/bin/darwin_amd64/mattermost $(DIST_PATH)/bin # from cross-compiled bin dir cp $(GOPATH)/bin/darwin_amd64/platform $(DIST_PATH)/bin # from cross-compiled bin dir + @for plugin_package in $(PLUGIN_PACKAGES) ; do \ + curl -s https://api.github.com/repos/mattermost/$$plugin_package/releases/latest | grep browser_download_url | grep darwin | cut -d '"' -f 4 | wget -qi - -P $(DIST_PATH)/prepackaged_plugins/ ;\ + done endif @# Package tar -C dist -czf $(DIST_PATH)-$(BUILD_TYPE_NAME)-osx-amd64.tar.gz mattermost @# Cleanup rm -f $(DIST_PATH)/bin/mattermost rm -f $(DIST_PATH)/bin/platform + rm -f $(DIST_PATH)/prepackaged_plugins/* @# Make windows package @# Copy binary ifeq ($(BUILDER_GOOS_GOARCH),"windows_amd64") cp $(GOPATH)/bin/mattermost.exe $(DIST_PATH)/bin # from native bin dir, not cross-compiled cp $(GOPATH)/bin/platform.exe $(DIST_PATH)/bin # from native bin dir, not cross-compiled + @for plugin_package in $(PLUGIN_PACKAGES) ; do \ + curl -s https://api.github.com/repos/mattermost/$$plugin_package/releases/latest | grep browser_download_url | grep windows | cut -d '"' -f 4 | wget -qi - -P $(DIST_PATH)/prepackaged_plugins/ ;\ + done else cp $(GOPATH)/bin/windows_amd64/mattermost.exe $(DIST_PATH)/bin # from cross-compiled bin dir cp $(GOPATH)/bin/windows_amd64/platform.exe $(DIST_PATH)/bin # from cross-compiled bin dir + @for plugin_package in $(PLUGIN_PACKAGES) ; do \ + curl -s https://api.github.com/repos/mattermost/$$plugin_package/releases/latest | grep browser_download_url | grep windows | cut -d '"' -f 4 | wget -qi - -P $(DIST_PATH)/prepackaged_plugins/ ;\ + done + endif @# Package cd $(DIST_ROOT) && zip -9 -r -q -l mattermost-$(BUILD_TYPE_NAME)-windows-amd64.zip mattermost && cd .. @# Cleanup rm -f $(DIST_PATH)/bin/mattermost.exe rm -f $(DIST_PATH)/bin/platform.exe + rm -f $(DIST_PATH)/prepackaged_plugins/* @# Make linux package @# Copy binary ifeq ($(BUILDER_GOOS_GOARCH),"linux_amd64") cp $(GOPATH)/bin/mattermost $(DIST_PATH)/bin # from native bin dir, not cross-compiled cp $(GOPATH)/bin/platform $(DIST_PATH)/bin # from native bin dir, not cross-compiled + @for plugin_package in $(PLUGIN_PACKAGES) ; do \ + curl -s https://api.github.com/repos/mattermost/$$plugin_package/releases/latest | grep browser_download_url | grep linux | cut -d '"' -f 4 | wget -qi - -P $(DIST_PATH)/prepackaged_plugins/ ;\ + done else cp $(GOPATH)/bin/linux_amd64/mattermost $(DIST_PATH)/bin # from cross-compiled bin dir cp $(GOPATH)/bin/linux_amd64/platform $(DIST_PATH)/bin # from cross-compiled bin dir + @for plugin_package in $(PLUGIN_PACKAGES) ; do \ + curl -s https://api.github.com/repos/mattermost/$$plugin_package/releases/latest | grep browser_download_url | grep linux | cut -d '"' -f 4 | wget -qi - -P $(DIST_PATH)/prepackaged_plugins/ ;\ + done endif @# Package tar -C dist -czf $(DIST_PATH)-$(BUILD_TYPE_NAME)-linux-amd64.tar.gz mattermost |