Update to get latest release from S3 (#15952)

* Update to get latest release from S3

* Update mmctl to download to use S3

* Download MMCTL from S3

* Update download_mmctl_release.sh

* Update Makefile

* Update release.mk

* Update the script called, remove call to sub shell and clean up indentation

* Add quotes around THIS_BRANCH var

* Update script to support overriding the OS for packaging

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
Jason Paul Deland
2020-10-16 20:27:50 -04:00
коммит произвёл GitHub
родитель 9b1dee7087
Коммит e280aa1c63
3 изменённых файлов: 34 добавлений и 17 удалений

Просмотреть файл

@@ -97,8 +97,8 @@ package:
mkdir -p $(DIST_PATH)/client
cp -RL $(BUILD_WEBAPP_DIR)/dist/* $(DIST_PATH)/client
$(eval MMCTL_REL_TO_DOWNLOAD := $(shell scripts/get_latest_release.sh 'mattermost/mmctl' 'release-'))
@echo "Using mmctl version $(MMCTL_REL_TO_DOWNLOAD)"
@#Download MMCTL
scripts/download_mmctl_release.sh
@# Help files
ifeq ($(BUILD_ENTERPRISE_READY),true)
@@ -133,7 +133,8 @@ else
cp $(GOBIN)/darwin_amd64/mattermost $(DIST_PATH)/bin # from cross-compiled bin dir
cp $(GOBIN)/darwin_amd64/platform $(DIST_PATH)/bin # from cross-compiled bin dir
endif
MMCTL_FILE="darwin_amd64.tar" && curl -f -O -L https://github.com/mattermost/mmctl/releases/download/$(MMCTL_REL_TO_DOWNLOAD)/$$MMCTL_FILE && tar -xvf $$MMCTL_FILE -C $(DIST_PATH)/bin && rm $$MMCTL_FILE
#Download MMCTL for OSX
scripts/download_mmctl_release.sh "Darwin"
@# Prepackage plugins
@for plugin_package in $(PLUGIN_PACKAGES) ; do \
ARCH="osx-amd64"; \
@@ -167,7 +168,8 @@ else
cp $(GOBIN)/windows_amd64/mattermost.exe $(DIST_PATH)/bin # from cross-compiled bin dir
cp $(GOBIN)/windows_amd64/platform.exe $(DIST_PATH)/bin # from cross-compiled bin dir
endif
MMCTL_FILE="windows_amd64.zip" && curl -f -O -L https://github.com/mattermost/mmctl/releases/download/$(MMCTL_REL_TO_DOWNLOAD)/$$MMCTL_FILE && unzip -o $$MMCTL_FILE -d $(DIST_PATH)/bin && rm $$MMCTL_FILE
#Download MMCTL for Windows
scripts/download_mmctl_release.sh "Windows"
@# Prepackage plugins
@for plugin_package in $(PLUGIN_PACKAGES) ; do \
ARCH="windows-amd64"; \
@@ -201,7 +203,8 @@ else
cp $(GOBIN)/linux_amd64/mattermost $(DIST_PATH)/bin # from cross-compiled bin dir
cp $(GOBIN)/linux_amd64/platform $(DIST_PATH)/bin # from cross-compiled bin dir
endif
MMCTL_FILE="linux_amd64.tar" && curl -f -O -L https://github.com/mattermost/mmctl/releases/download/$(MMCTL_REL_TO_DOWNLOAD)/$$MMCTL_FILE && tar -xvf $$MMCTL_FILE -C $(DIST_PATH)/bin && rm $$MMCTL_FILE
#Download MMCTL for Linux
scripts/download_mmctl_release.sh "Linux"
@# Prepackage plugins
@for plugin_package in $(PLUGIN_PACKAGES) ; do \
ARCH="linux-amd64"; \