MM-15882 Switching to new ci for prepackaged plugins and stripping alternate platform binaries. (#11025)
* Switching to new ci for prepackaged plugins and stripping alternate platform binaries. * Feedback
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
5f3e6ad20a
Коммит
118cd02613
2
Makefile
2
Makefile
@@ -74,7 +74,7 @@ TESTFLAGSEE ?= -short
|
|||||||
TE_PACKAGES=$(shell go list ./...|grep -v plugin_tests)
|
TE_PACKAGES=$(shell go list ./...|grep -v plugin_tests)
|
||||||
|
|
||||||
# Plugins Packages
|
# Plugins Packages
|
||||||
PLUGIN_PACKAGES=mattermost-plugin-zoom mattermost-plugin-jira
|
PLUGIN_PACKAGES=mattermost-plugin-zoom-v1.0.6
|
||||||
|
|
||||||
# Prepares the enterprise build if exists. The IGNORE stuff is a hack to get the Makefile to execute the commands outside a target
|
# 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)
|
ifeq ($(BUILD_ENTERPRISE_READY),true)
|
||||||
|
|||||||
@@ -64,8 +64,9 @@ endif
|
|||||||
cp README.md $(DIST_PATH)
|
cp README.md $(DIST_PATH)
|
||||||
|
|
||||||
@# Download prepackaged plugins
|
@# Download prepackaged plugins
|
||||||
|
mkdir -p tmpprepackaged
|
||||||
@for plugin_package in $(PLUGIN_PACKAGES) ; do \
|
@for plugin_package in $(PLUGIN_PACKAGES) ; do \
|
||||||
curl -s https://api.github.com/repos/mattermost/$$plugin_package/releases/latest | awk -F\" '/browser_download_url/ { system("cd $(DIST_PATH)/prepackaged_plugins; curl -OL " $$4) }';\
|
cd tmpprepackaged && curl -O -L https://plugins-store.test.mattermost.com/release/$$plugin_package.tar.gz; \
|
||||||
done
|
done
|
||||||
|
|
||||||
@# ----- PLATFORM SPECIFIC -----
|
@# ----- PLATFORM SPECIFIC -----
|
||||||
@@ -79,11 +80,16 @@ else
|
|||||||
cp $(GOPATH)/bin/darwin_amd64/mattermost $(DIST_PATH)/bin # from cross-compiled bin dir
|
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
|
cp $(GOPATH)/bin/darwin_amd64/platform $(DIST_PATH)/bin # from cross-compiled bin dir
|
||||||
endif
|
endif
|
||||||
|
@# Strip and prepackage plugins
|
||||||
|
@for plugin_package in $(PLUGIN_PACKAGES) ; do \
|
||||||
|
cat tmpprepackaged/$$plugin_package.tar.gz | gunzip | tar --wildcards --delete "*windows*" --delete "*linux*" | gzip > $(DIST_PATH)/prepackaged_plugins/$$plugin_package.tar.gz; \
|
||||||
|
done
|
||||||
@# Package
|
@# Package
|
||||||
tar -C dist -czf $(DIST_PATH)-$(BUILD_TYPE_NAME)-osx-amd64.tar.gz mattermost
|
tar -C dist -czf $(DIST_PATH)-$(BUILD_TYPE_NAME)-osx-amd64.tar.gz mattermost
|
||||||
@# Cleanup
|
@# Cleanup
|
||||||
rm -f $(DIST_PATH)/bin/mattermost
|
rm -f $(DIST_PATH)/bin/mattermost
|
||||||
rm -f $(DIST_PATH)/bin/platform
|
rm -f $(DIST_PATH)/bin/platform
|
||||||
|
rm -f $(DIST_PATH)/prepackaged_plugins/*
|
||||||
|
|
||||||
@# Make windows package
|
@# Make windows package
|
||||||
@# Copy binary
|
@# Copy binary
|
||||||
@@ -94,11 +100,16 @@ else
|
|||||||
cp $(GOPATH)/bin/windows_amd64/mattermost.exe $(DIST_PATH)/bin # from cross-compiled bin dir
|
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
|
cp $(GOPATH)/bin/windows_amd64/platform.exe $(DIST_PATH)/bin # from cross-compiled bin dir
|
||||||
endif
|
endif
|
||||||
|
@# Strip and prepackage plugins
|
||||||
|
@for plugin_package in $(PLUGIN_PACKAGES) ; do \
|
||||||
|
cat tmpprepackaged/$$plugin_package.tar.gz | gunzip | tar --wildcards --delete "*darwin*" --delete "*linux*" | gzip > $(DIST_PATH)/prepackaged_plugins/$$plugin_package.tar.gz; \
|
||||||
|
done
|
||||||
@# Package
|
@# Package
|
||||||
cd $(DIST_ROOT) && zip -9 -r -q -l mattermost-$(BUILD_TYPE_NAME)-windows-amd64.zip mattermost && cd ..
|
cd $(DIST_ROOT) && zip -9 -r -q -l mattermost-$(BUILD_TYPE_NAME)-windows-amd64.zip mattermost && cd ..
|
||||||
@# Cleanup
|
@# Cleanup
|
||||||
rm -f $(DIST_PATH)/bin/mattermost.exe
|
rm -f $(DIST_PATH)/bin/mattermost.exe
|
||||||
rm -f $(DIST_PATH)/bin/platform.exe
|
rm -f $(DIST_PATH)/bin/platform.exe
|
||||||
|
rm -f $(DIST_PATH)/prepackaged_plugins/*
|
||||||
|
|
||||||
@# Make linux package
|
@# Make linux package
|
||||||
@# Copy binary
|
@# Copy binary
|
||||||
@@ -109,7 +120,13 @@ else
|
|||||||
cp $(GOPATH)/bin/linux_amd64/mattermost $(DIST_PATH)/bin # from cross-compiled bin dir
|
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
|
cp $(GOPATH)/bin/linux_amd64/platform $(DIST_PATH)/bin # from cross-compiled bin dir
|
||||||
endif
|
endif
|
||||||
|
@# Strip and prepackage plugins
|
||||||
|
@for plugin_package in $(PLUGIN_PACKAGES) ; do \
|
||||||
|
cat tmpprepackaged/$$plugin_package.tar.gz | gunzip | tar --wildcards --delete "*windows*" --delete "*darwin*" | gzip > $(DIST_PATH)/prepackaged_plugins/$$plugin_package.tar.gz; \
|
||||||
|
done
|
||||||
@# Package
|
@# Package
|
||||||
tar -C dist -czf $(DIST_PATH)-$(BUILD_TYPE_NAME)-linux-amd64.tar.gz mattermost
|
tar -C dist -czf $(DIST_PATH)-$(BUILD_TYPE_NAME)-linux-amd64.tar.gz mattermost
|
||||||
@# Don't clean up native package so dev machines will have an unzipped package available
|
@# Don't clean up native package so dev machines will have an unzipped package available
|
||||||
@#rm -f $(DIST_PATH)/bin/mattermost
|
@#rm -f $(DIST_PATH)/bin/mattermost
|
||||||
|
|
||||||
|
rm -rf tmpprepackaged
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user