Fix downloading of prepackged plugins for releases (#9994)
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
ea8e9497a8
Коммит
1f197d7c55
@@ -60,6 +60,11 @@ endif
|
|||||||
cp NOTICE.txt $(DIST_PATH)
|
cp NOTICE.txt $(DIST_PATH)
|
||||||
cp README.md $(DIST_PATH)
|
cp README.md $(DIST_PATH)
|
||||||
|
|
||||||
|
@# Download prepackaged plugins
|
||||||
|
@for plugin_package in $(PLUGIN_PACKAGES) ; do \
|
||||||
|
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/ ;\
|
||||||
|
done
|
||||||
|
|
||||||
@# ----- PLATFORM SPECIFIC -----
|
@# ----- PLATFORM SPECIFIC -----
|
||||||
|
|
||||||
@# Make osx package
|
@# Make osx package
|
||||||
@@ -67,60 +72,39 @@ endif
|
|||||||
ifeq ($(BUILDER_GOOS_GOARCH),"darwin_amd64")
|
ifeq ($(BUILDER_GOOS_GOARCH),"darwin_amd64")
|
||||||
cp $(GOPATH)/bin/mattermost $(DIST_PATH)/bin # from native bin dir, not cross-compiled
|
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
|
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
|
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
|
||||||
@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
|
endif
|
||||||
@# 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
|
||||||
ifeq ($(BUILDER_GOOS_GOARCH),"windows_amd64")
|
ifeq ($(BUILDER_GOOS_GOARCH),"windows_amd64")
|
||||||
cp $(GOPATH)/bin/mattermost.exe $(DIST_PATH)/bin # from native bin dir, not cross-compiled
|
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
|
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
|
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
|
||||||
@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
|
endif
|
||||||
@# 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
|
||||||
ifeq ($(BUILDER_GOOS_GOARCH),"linux_amd64")
|
ifeq ($(BUILDER_GOOS_GOARCH),"linux_amd64")
|
||||||
cp $(GOPATH)/bin/mattermost $(DIST_PATH)/bin # from native bin dir, not cross-compiled
|
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
|
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
|
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
|
||||||
@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
|
endif
|
||||||
@# 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
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user