From 06ac371c532d9185412b445228c84ad4ea141a33 Mon Sep 17 00:00:00 2001 From: parnic-sks <62021255+parnic-sks@users.noreply.github.com> Date: Tue, 12 Oct 2021 10:44:48 -0500 Subject: [PATCH] Update for Mattermost v6 (#133) * Update for Mattermost v6 * Update release.mk patch The Mattermost build script has changed to accomplish most of what we were trying to patch it to support. The config generator is still a point of contention, and I'm having trouble getting it to work even with this patch, but wanted to toss it to the build machine to see if it works there. We may need to dig into the config generator deeper if it doesn't. There are additional build script changes after 6.0 that have, for example, linux-arm64 support already baked in, so we will eventually need to make larger changes to which platforms we build at all. --- build-release.patch | 39 ++++++--------------------------------- dependabot/dummy.go | 6 ++++-- dependabot/go.mod | 2 +- 3 files changed, 11 insertions(+), 36 deletions(-) diff --git a/build-release.patch b/build-release.patch index 227b8b5..9ff3afb 100644 --- a/build-release.patch +++ b/build-release.patch @@ -1,8 +1,8 @@ diff --git a/build/release.mk b/build/release.mk -index 1530e75c6..befe5c9b7 100644 +index 7f989d4b4..886119275 100644 --- a/build/release.mk +++ b/build/release.mk -@@ -76,7 +76,7 @@ package: +@@ -71,7 +71,7 @@ package-prep: @# Resource directories mkdir -p $(DIST_PATH)/config cp -L config/README.md $(DIST_PATH)/config @@ -11,39 +11,12 @@ index 1530e75c6..befe5c9b7 100644 cp -RL fonts $(DIST_PATH) cp -RL templates $(DIST_PATH) rm -rf $(DIST_PATH)/templates/*.mjml $(DIST_PATH)/templates/partials/ -@@ -98,7 +98,7 @@ package: - cp -RL $(BUILD_WEBAPP_DIR)/dist/* $(DIST_PATH)/client - - @#Download MMCTL -- scripts/download_mmctl_release.sh "" $(DIST_PATH)/bin -+ #scripts/download_mmctl_release.sh "" $(DIST_PATH)/bin - - @# Help files - ifeq ($(BUILD_ENTERPRISE_READY),true) -@@ -127,7 +127,7 @@ endif - - - @# ----- PLATFORM SPECIFIC ----- -- -+_: - @# Make osx package - @# Copy binary - ifeq ($(BUILDER_GOOS_GOARCH),"darwin_amd64") -@@ -197,7 +197,7 @@ endif - rm -f $(DIST_PATH)/bin/platform.exe - rm -f $(DIST_PATH)/bin/mmctl.exe - rm -f $(DIST_PATH)/prepackaged_plugins/* -- -+package-linux: package - @# Make linux package - @# Copy binary - ifeq ($(BUILDER_GOOS_GOARCH),"linux_amd64") -@@ -208,7 +208,7 @@ else - cp $(GOBIN)/linux_amd64/platform $(DIST_PATH)/bin # from cross-compiled bin dir +@@ -201,7 +201,7 @@ else + cp $(GOBIN)/linux_amd64/mattermost $(DIST_PATH_LIN)/bin # from cross-compiled bin dir endif #Download MMCTL for Linux -- scripts/download_mmctl_release.sh "Linux" $(DIST_PATH)/bin -+ #scripts/download_mmctl_release.sh "Linux" $(DIST_PATH)/bin +- scripts/download_mmctl_release.sh "Linux" $(DIST_PATH_LIN)/bin ++ #scripts/download_mmctl_release.sh "Linux" $(DIST_PATH_LIN)/bin @# Prepackage plugins @for plugin_package in $(PLUGIN_PACKAGES) ; do \ ARCH="linux-amd64"; \ diff --git a/dependabot/dummy.go b/dependabot/dummy.go index d216c1b..b00aaa5 100644 --- a/dependabot/dummy.go +++ b/dependabot/dummy.go @@ -1,3 +1,5 @@ package main -import _ "github.com/mattermost/mattermost-server/v5/model" -func main() {/* dummy file */} + +import _ "github.com/mattermost/mattermost-server/v6/model" + +func main() { /* dummy file */ } diff --git a/dependabot/go.mod b/dependabot/go.mod index 67692e5..e4ca5dc 100644 --- a/dependabot/go.mod +++ b/dependabot/go.mod @@ -2,4 +2,4 @@ module github.com/SmartHoneybee/ubiquitous-memory/dependabot go 1.16 -require github.com/mattermost/mattermost-server/v5 v5.39.0 +require github.com/mattermost/mattermost-server/v6 v6.0.0