Skip to content

Commit 3aed6ef

Browse files
authoredDec 21, 2018
download jira 1.0.1 (mattermost#10030)
1 parent 0c12072 commit 3aed6ef

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed
 

‎Makefile

+3-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,9 @@ TE_PACKAGES=$(shell go list ./...)
7474
TE_PACKAGES_COMMA=$(shell echo $(TE_PACKAGES) | tr ' ' ',')
7575

7676
# Plugins Packages
77-
PLUGIN_PACKAGES=mattermost-plugin-zoom mattermost-plugin-jira
77+
PLUGIN_PACKAGES=mattermost-plugin-zoom
78+
# 12076003 means release version 1.0.1
79+
PLUGIN_PACKAGES_LEGACY=mattermost-plugin-jira/releases/12076003
7880

7981
# Prepares the enterprise build if exists. The IGNORE stuff is a hack to get the Makefile to execute the commands outside a target
8082
ifeq ($(BUILD_ENTERPRISE_READY),true)

‎build/release.mk

+28
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ endif
6161
cp README.md $(DIST_PATH)
6262

6363
@# Download prepackaged plugins
64+
@echo Downloading prepackaged plugins
6465
@for plugin_package in $(PLUGIN_PACKAGES) ; do \
6566
curl -s https://api.github.com/repos/mattermost/$$plugin_package/releases/latest | grep browser_download_url | cut -d '"' -f 4 | wget -qi - -P $(DIST_PATH)/prepackaged_plugins/ ;\
6667
done
@@ -72,39 +73,66 @@ endif
7273
ifeq ($(BUILDER_GOOS_GOARCH),"darwin_amd64")
7374
cp $(GOPATH)/bin/mattermost $(DIST_PATH)/bin # from native bin dir, not cross-compiled
7475
cp $(GOPATH)/bin/platform $(DIST_PATH)/bin # from native bin dir, not cross-compiled
76+
77+
@echo Downloading prepackaged plugins legacy
78+
@for plugin_package_legacy in $(PLUGIN_PACKAGES_LEGACY) ; do \
79+
curl -s https://api.github.com/repos/mattermost/$$plugin_package_legacy | grep browser_download_url | grep darwin | cut -d '"' -f 4 | wget -qi - -P $(DIST_PATH)/prepackaged_plugins/ ;\
80+
done
7581
else
7682
cp $(GOPATH)/bin/darwin_amd64/mattermost $(DIST_PATH)/bin # from cross-compiled bin dir
7783
cp $(GOPATH)/bin/darwin_amd64/platform $(DIST_PATH)/bin # from cross-compiled bin dir
84+
@echo Downloading prepackaged plugins legacy
85+
@for plugin_package_legacy in $(PLUGIN_PACKAGES_LEGACY) ; do \
86+
curl -s https://api.github.com/repos/mattermost/$$plugin_package_legacy | grep browser_download_url | grep darwin | cut -d '"' -f 4 | wget -qi - -P $(DIST_PATH)/prepackaged_plugins/ ;\
87+
done
7888
endif
7989
@# Package
8090
tar -C dist -czf $(DIST_PATH)-$(BUILD_TYPE_NAME)-osx-amd64.tar.gz mattermost
8191
@# Cleanup
8292
rm -f $(DIST_PATH)/bin/mattermost
8393
rm -f $(DIST_PATH)/bin/platform
94+
rm -f $(DIST_PATH)/prepackaged_plugins/*jira*
8495

8596
@# Make windows package
8697
@# Copy binary
8798
ifeq ($(BUILDER_GOOS_GOARCH),"windows_amd64")
8899
cp $(GOPATH)/bin/mattermost.exe $(DIST_PATH)/bin # from native bin dir, not cross-compiled
89100
cp $(GOPATH)/bin/platform.exe $(DIST_PATH)/bin # from native bin dir, not cross-compiled
101+
@echo Downloading prepackaged plugins legacy
102+
@for plugin_package_legacy in $(PLUGIN_PACKAGES_LEGACY) ; do \
103+
curl -s https://api.github.com/repos/mattermost/$$plugin_package_legacy | grep browser_download_url | grep windows | cut -d '"' -f 4 | wget -qi - -P $(DIST_PATH)/prepackaged_plugins/ ;\
104+
done
90105
else
91106
cp $(GOPATH)/bin/windows_amd64/mattermost.exe $(DIST_PATH)/bin # from cross-compiled bin dir
92107
cp $(GOPATH)/bin/windows_amd64/platform.exe $(DIST_PATH)/bin # from cross-compiled bin dir
108+
@echo Downloading prepackaged plugins legacy
109+
@for plugin_package_legacy in $(PLUGIN_PACKAGES_LEGACY) ; do \
110+
curl -s https://api.github.com/repos/mattermost/$$plugin_package_legacy | grep browser_download_url | grep windows | cut -d '"' -f 4 | wget -qi - -P $(DIST_PATH)/prepackaged_plugins/ ;\
111+
done
93112
endif
94113
@# Package
95114
cd $(DIST_ROOT) && zip -9 -r -q -l mattermost-$(BUILD_TYPE_NAME)-windows-amd64.zip mattermost && cd ..
96115
@# Cleanup
97116
rm -f $(DIST_PATH)/bin/mattermost.exe
98117
rm -f $(DIST_PATH)/bin/platform.exe
118+
rm -f $(DIST_PATH)/prepackaged_plugins/*jira*
99119

100120
@# Make linux package
101121
@# Copy binary
102122
ifeq ($(BUILDER_GOOS_GOARCH),"linux_amd64")
103123
cp $(GOPATH)/bin/mattermost $(DIST_PATH)/bin # from native bin dir, not cross-compiled
104124
cp $(GOPATH)/bin/platform $(DIST_PATH)/bin # from native bin dir, not cross-compiled
125+
@echo Downloading prepackaged plugins legacy
126+
@for plugin_package_legacy in $(PLUGIN_PACKAGES_LEGACY) ; do \
127+
curl -s https://api.github.com/repos/mattermost/$$plugin_package_legacy | grep browser_download_url | grep linux | cut -d '"' -f 4 | wget -qi - -P $(DIST_PATH)/prepackaged_plugins/ ;\
128+
done
105129
else
106130
cp $(GOPATH)/bin/linux_amd64/mattermost $(DIST_PATH)/bin # from cross-compiled bin dir
107131
cp $(GOPATH)/bin/linux_amd64/platform $(DIST_PATH)/bin # from cross-compiled bin dir
132+
@echo Downloading prepackaged plugins legacy
133+
@for plugin_package_legacy in $(PLUGIN_PACKAGES_LEGACY) ; do \
134+
curl -s https://api.github.com/repos/mattermost/$$plugin_package_legacy | grep browser_download_url | grep linux | cut -d '"' -f 4 | wget -qi - -P $(DIST_PATH)/prepackaged_plugins/ ;\
135+
done
108136
endif
109137
@# Package
110138
tar -C dist -czf $(DIST_PATH)-$(BUILD_TYPE_NAME)-linux-amd64.tar.gz mattermost

0 commit comments

Comments
 (0)
Failed to load comments.