1
0
mirror of https://github.com/SmartHoneybee/ubiquitous-memory synced 2025-10-24 07:13:46 +02:00

Compare commits

...

36 Commits

Author SHA1 Message Date
parnic-sks
79bcde5f55 Update to v7.5.2 (#160) 2022-12-21 12:22:10 -06:00
parnic-sks
a0c00708b5 Update Mattermost to v7.4.0 (#158) 2022-10-14 09:31:38 -05:00
parnic-sks
598db95863 Update to Mattermost v7.3.0 (#157)
* Update to Mattermost v7.3.0

* Install Node via NVM instead of the apt repo

The NVM setup script didn't work if the script was running with /bin/sh, so this makes it run under Bash instead.

The Node version that the webapp is using is now the one we install for use with the webapp build process.
2022-09-15 11:44:34 -05:00
parnic-sks
bdacb84580 Update to Mattermost v7.2.0 (#156) 2022-08-15 10:13:11 -05:00
parnic-sks
b7c03a36af Update to v7.1.2 (#155)
* Update to v7.1.2

* Try Node 16 again

Last time we tried to use this, we ran into all sorts of errors due to node-sass, which is used by the mattermost frontend.

I'm changing this because our build logs show NPM throwing a fit about not supporting Node 15, which we've been using. And the last several PR builds have errored out in NPM in weird ways that the internet keeps suggesting "just update NPM" to fix, so here we are.

ref: commit 69dda8131e
2022-07-21 09:24:13 -05:00
parnic-sks
22102fdefc Update Mattermost to v7.0.1, mmctl to v7.0.0 (#154) 2022-06-24 09:04:08 -05:00
parnic-sks
acc0ef08cd Update to v7.0.0 (#153) 2022-06-14 10:04:57 -05:00
dependabot[bot]
860b28b652 Bump github.com/mattermost/mattermost-server/v6 in /dependabot (#152)
Bumps [github.com/mattermost/mattermost-server/v6](https://github.com/mattermost/mattermost-server) from 6.7.0 to 6.7.1.
- [Release notes](https://github.com/mattermost/mattermost-server/releases)
- [Changelog](https://github.com/mattermost/mattermost-server/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mattermost/mattermost-server/compare/v6.7.0...v6.7.1)

---
updated-dependencies:
- dependency-name: github.com/mattermost/mattermost-server/v6
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-13 21:59:01 -05:00
parnic-sks
1b49e25db7 Update default Go version (#151)
Mattermost v6.7.0 official release is built with Go 1.18.1. We should stay with them as much as possible.
2022-05-16 13:25:28 -05:00
dependabot[bot]
542f871d30 Bump github.com/mattermost/mattermost-server/v6 from 6.6.1 to 6.7.0 in /dependabot (#150)
Bumps [github.com/mattermost/mattermost-server/v6](https://github.com/mattermost/mattermost-server) from 6.6.1 to 6.7.0.
- [Release notes](https://github.com/mattermost/mattermost-server/releases)
- [Changelog](https://github.com/mattermost/mattermost-server/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mattermost/mattermost-server/compare/v6.6.1...v6.7.0)

---
updated-dependencies:
- dependency-name: github.com/mattermost/mattermost-server/v6
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-16 08:08:12 +02:00
dependabot[bot]
b4bf8fc00e Bump github.com/mattermost/mattermost-server/v6 in /dependabot (#149)
Bumps [github.com/mattermost/mattermost-server/v6](https://github.com/mattermost/mattermost-server) from 6.6.0 to 6.6.1.
- [Release notes](https://github.com/mattermost/mattermost-server/releases)
- [Changelog](https://github.com/mattermost/mattermost-server/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mattermost/mattermost-server/compare/v6.6.0...v6.6.1)

---
updated-dependencies:
- dependency-name: github.com/mattermost/mattermost-server/v6
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-29 08:51:50 -05:00
dependabot[bot]
404ed7f60c Bump github.com/mattermost/mattermost-server/v6 in /dependabot (#148)
Bumps [github.com/mattermost/mattermost-server/v6](https://github.com/mattermost/mattermost-server) from 6.5.0 to 6.6.0.
- [Release notes](https://github.com/mattermost/mattermost-server/releases)
- [Changelog](https://github.com/mattermost/mattermost-server/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mattermost/mattermost-server/compare/v6.5.0...v6.6.0)

---
updated-dependencies:
- dependency-name: github.com/mattermost/mattermost-server/v6
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-14 08:34:04 -05:00
dependabot[bot]
890eb1c602 Bump github.com/mattermost/mattermost-server/v6 in /dependabot (#147)
Bumps [github.com/mattermost/mattermost-server/v6](https://github.com/mattermost/mattermost-server) from 6.4.2 to 6.5.0.
- [Release notes](https://github.com/mattermost/mattermost-server/releases)
- [Changelog](https://github.com/mattermost/mattermost-server/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mattermost/mattermost-server/compare/v6.4.2...v6.5.0)

---
updated-dependencies:
- dependency-name: github.com/mattermost/mattermost-server/v6
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-16 07:27:27 -05:00
dependabot[bot]
476501913c Bump github.com/mattermost/mattermost-server/v6 from 6.4.1 to 6.4.2 in /dependabot (#146)
Bumps [github.com/mattermost/mattermost-server/v6](https://github.com/mattermost/mattermost-server) from 6.4.1 to 6.4.2.
- [Release notes](https://github.com/mattermost/mattermost-server/releases)
- [Changelog](https://github.com/mattermost/mattermost-server/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mattermost/mattermost-server/compare/v6.4.1...v6.4.2)

---
updated-dependencies:
- dependency-name: github.com/mattermost/mattermost-server/v6
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-11 08:08:15 +01:00
dependabot[bot]
d5c44dd9a8 Bump github.com/mattermost/mattermost-server/v6 in /dependabot (#145)
Bumps [github.com/mattermost/mattermost-server/v6](https://github.com/mattermost/mattermost-server) from 6.4.0 to 6.4.1.
- [Release notes](https://github.com/mattermost/mattermost-server/releases)
- [Changelog](https://github.com/mattermost/mattermost-server/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mattermost/mattermost-server/compare/v6.4.0...v6.4.1)

---
updated-dependencies:
- dependency-name: github.com/mattermost/mattermost-server/v6
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-25 10:01:29 -06:00
dependabot[bot]
a624e66742 Bump github.com/mattermost/mattermost-server/v6 from 6.3.3 to 6.4.0 in /dependabot (#144)
* Bump github.com/mattermost/mattermost-server/v6 in /dependabot

Bumps [github.com/mattermost/mattermost-server/v6](https://github.com/mattermost/mattermost-server) from 6.3.3 to 6.4.0.
- [Release notes](https://github.com/mattermost/mattermost-server/releases)
- [Changelog](https://github.com/mattermost/mattermost-server/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mattermost/mattermost-server/compare/v6.3.3...v6.4.0)

---
updated-dependencies:
- dependency-name: github.com/mattermost/mattermost-server/v6
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Force mmctl version

Mattermost has not tagged a v6.4.0 mmctl release, and mmctl continues to cause issues with trying to get releases done, so I'm just going to force the version for now.

* Fix typo

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: parnic-sks <chris@straykitestudios.com>
2022-02-24 11:13:40 +01:00
dependabot[bot]
5d1eec08f2 Bump github.com/mattermost/mattermost-server/v6 from 6.3.2 to 6.3.3 in /dependabot (#143)
* Bump github.com/mattermost/mattermost-server/v6 in /dependabot

Bumps [github.com/mattermost/mattermost-server/v6](https://github.com/mattermost/mattermost-server) from 6.3.2 to 6.3.3.
- [Release notes](https://github.com/mattermost/mattermost-server/releases)
- [Changelog](https://github.com/mattermost/mattermost-server/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mattermost/mattermost-server/compare/v6.3.2...v6.3.3)

---
updated-dependencies:
- dependency-name: github.com/mattermost/mattermost-server/v6
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Use the mattermost-server version for mmctl

Since mmctl isn't versioned in a gomodules-friendly way, we either need to manually maintain the version in the release script or just assume/hope that they continue to create releases matching the mattermost-server version. So far that has always been the case, so we can ignore the go.mod version string.

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: parnic-sks <chris@straykitestudios.com>
2022-02-04 09:11:55 -06:00
parnic-sks
b4bfed6058 Update Mattermost to v6.3.2 (#142)
This also removes the mmctl entry since it's not versioned correctly for modules.
2022-01-31 09:13:37 -06:00
parnic-sks
155ef473dd Update Mattermost to v6.3.1 (#141)
This also fixes the version of mmctl we're packaging from v5.26.0 to the appropriate matching version (v6.3.0 now).
2022-01-21 10:09:51 -06:00
dependabot[bot]
69dda8131e Bump github.com/mattermost/mattermost-server/v6 from 6.2.1 to 6.3.0 in /dependabot (#140)
* Bump github.com/mattermost/mattermost-server/v6 in /dependabot

Bumps [github.com/mattermost/mattermost-server/v6](https://github.com/mattermost/mattermost-server) from 6.2.1 to 6.3.0.
- [Release notes](https://github.com/mattermost/mattermost-server/releases)
- [Changelog](https://github.com/mattermost/mattermost-server/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mattermost/mattermost-server/compare/v6.2.1...v6.3.0)

---
updated-dependencies:
- dependency-name: github.com/mattermost/mattermost-server/v6
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Add python2 dependency

Apparently something in 6.3.0 is using python2 for the first time?

* Use node v15 by default

We are now getting this error when building:

    /build/.node-gyp/16.13.2/include/node/v8-internal.h:492:38: error: 'remove_cv_t' is not a member of 'std'

which the internet suggests is a problem with node 16 and node-sass. According to https://stackoverflow.com/questions/67241196/error-no-template-named-remove-cv-t-in-namespace-std-did-you-mean-remove , supposedly newer versions of node-sass support node 16, and the other solution is to pass -std=c++14 instead of c++0x (which is what is being done right now), but I can't say for sure whether this build script will work with CXXFLAGS or not. The other fix would seem to be to update node-sass to a version that supports node16, but that would presumably be more patching of files, this time in mattermost-webapp, so I'm trying the least-invasive option first.

* Update release.mk patch

* Update how we retrieve the Mattermost version

With mmctl in the require list in the go.mod, mattermost-server no longer appears on the same line as the require statement, so splitting by spaces means we now need the second split entry instead of the third.

We could also fix this by removing mmctl from the go.mod, which I was going to do, but that means every Dependabot update would no longer work. So going forward we will need to ensure that the go.mod always has the mattermost-server require on its own line instead of inline with the require statement.

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: parnic-sks <chris@straykitestudios.com>
2022-01-14 19:14:25 -06:00
Pierre de La Morinerie
a02a6b4386 Update Mattermost and mmctl to 6.2.1 (#139) 2021-12-20 13:00:20 +01:00
Pierre de La Morinerie
3aec2b6302 Update Mattermost and mmctl to 6.1.0 (#137) 2021-11-29 07:54:04 +01:00
Pierre de La Morinerie
cef04b0488 Build and package mmctl (#136) 2021-11-08 18:50:47 +01:00
parnic-sks
f3aa038f93 Update to v6.0.2 (#135) 2021-10-29 08:17:39 +02:00
dependabot[bot]
ce52eca004 Bump github.com/mattermost/mattermost-server/v6 in /dependabot (#134)
Bumps [github.com/mattermost/mattermost-server/v6](https://github.com/mattermost/mattermost-server) from 6.0.0 to 6.0.1.
- [Release notes](https://github.com/mattermost/mattermost-server/releases)
- [Changelog](https://github.com/mattermost/mattermost-server/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mattermost/mattermost-server/compare/v6.0.0...v6.0.1)

---
updated-dependencies:
- dependency-name: github.com/mattermost/mattermost-server/v6
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-10-18 21:39:42 -05:00
parnic-sks
06ac371c53 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.
2021-10-12 10:44:48 -05:00
parnic-sks
a55b21d6e7 Update Mattermost to v5.39 (#132) 2021-09-16 12:26:42 -05:00
dependabot[bot]
ca9c6e47c5 Bump github.com/mattermost/mattermost-server/v5 from 5.38.1 to 5.38.2 in /dependabot (#131)
* Bump github.com/mattermost/mattermost-server/v5 in /dependabot

Bumps [github.com/mattermost/mattermost-server/v5](https://github.com/mattermost/mattermost-server) from 5.38.1 to 5.38.2.
- [Release notes](https://github.com/mattermost/mattermost-server/releases)
- [Changelog](https://github.com/mattermost/mattermost-server/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mattermost/mattermost-server/compare/v5.38.1...v5.38.2)

---
updated-dependencies:
- dependency-name: github.com/mattermost/mattermost-server/v5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Remove errant requires

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: parnic-sks <chris@straykitestudios.com>
2021-08-26 21:55:32 -05:00
parnic-sks
89f37ddd12 Update to Go 1.16.7 per MM 5.38.2 release notes (#130) 2021-08-26 16:13:47 -05:00
dependabot[bot]
a5c6a921e2 Bump github.com/mattermost/mattermost-server/v5 from 5.38.0 to 5.38.1 in /dependabot (#129)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-19 13:19:28 +02:00
Pierre de La Morinerie
02f1846b2b Upgrade to 5.38.0 (#128) 2021-08-17 23:09:46 +02:00
parnic-sks
362f5cf97f Update Golang version per Mattermost 5.38.0 release notes (#127)
* Update Golang version per Mattermost 5.38.0 release notes

* Update version formatting to match download filename
2021-08-16 23:56:56 +02:00
Pierre de La Morinerie
4b09124333 Upgrade to 5.37.1 (#126) 2021-08-08 09:08:19 +02:00
Pierre de La Morinerie
7332922733 Upgrade to Mattermost 5.37.0 (#125) 2021-07-15 23:08:18 +02:00
dependabot[bot]
605dd4992e Bump github.com/mattermost/mattermost-server/v5 from 5.36.0 to 5.36.1 in /dependabot (#124)
Bumps [github.com/mattermost/mattermost-server/v5](https://github.com/mattermost/mattermost-server) from 5.36.0 to 5.36.1.
- [Release notes](https://github.com/mattermost/mattermost-server/releases)
- [Changelog](https://github.com/mattermost/mattermost-server/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mattermost/mattermost-server/compare/v5.36.0...v5.36.1)

---
updated-dependencies:
- dependency-name: github.com/mattermost/mattermost-server/v5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-23 08:20:30 +02:00
Pierre de La Morinerie
f58b2018c4 Fix build (#123)
Co-authored-by: parnic-sks <chris@straykitestudios.com>
2021-06-23 07:42:40 +02:00
5 changed files with 68 additions and 62 deletions

View File

@@ -9,7 +9,7 @@ env:
DEBIAN_RELEASE: buster
DOCKER_PWD: /root
DOCKER_IMAGE: debian:${DEBIAN_RELEASE}
GO_VERSION: 1.15.5
GO_VERSION: 1.18.1
jobs:
build:
@@ -55,7 +55,9 @@ jobs:
uses: actions/checkout@v2
- name: Set environment from runtime properties
run: echo "MATTERMOST_RELEASE=$(grep 'mattermost' dependabot/go.mod | cut -d' ' -f3)" >> $GITHUB_ENV
run: |
echo "MATTERMOST_RELEASE=$(grep 'mattermost-server' dependabot/go.mod | cut -d' ' -f2)" >> $GITHUB_ENV
echo "MMCTL_RELEASE=v7.5.2" >> $GITHUB_ENV
- name: Pull docker image
run: 'docker pull "${{ env.DOCKER_IMAGE }}"'
@@ -64,7 +66,7 @@ jobs:
env:
GOOS: ${{ matrix.os }}
GOARCH: ${{ matrix.arch }}
run: docker run --mount="type=bind,source=$PWD,destination=${{ env.DOCKER_PWD }}" --rm=true --tty=true --workdir="${{ env.DOCKER_PWD }}" -e DEBIAN_RELEASE -e MATTERMOST_RELEASE -e GOOS -e GOARCH "${{ env.DOCKER_IMAGE }}" ./build.sh
run: docker run --mount="type=bind,source=$PWD,destination=${{ env.DOCKER_PWD }}" --rm=true --tty=true --workdir="${{ env.DOCKER_PWD }}" -e DEBIAN_RELEASE -e MATTERMOST_RELEASE -e MMCTL_RELEASE -e GOOS -e GOARCH "${{ env.DOCKER_IMAGE }}" ./build.sh
- name: Tag release
if: github.ref == 'refs/heads/master'

View File

@@ -1,8 +1,8 @@
diff --git a/build/release.mk b/build/release.mk
index 1530e75c6..befe5c9b7 100644
index faa027239..df40f0c68 100644
--- a/build/release.mk
+++ b/build/release.mk
@@ -76,7 +76,7 @@ package:
@@ -99,7 +99,7 @@ package-prep:
@# Resource directories
mkdir -p $(DIST_PATH)/config
cp -L config/README.md $(DIST_PATH)/config
@@ -11,39 +11,14 @@ 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
@@ -159,8 +159,8 @@ else
cp $(GOBIN)/$(CURRENT_PACKAGE_ARCH)/$(MM_BIN_NAME) $(DIST_PATH_GENERIC)/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
@# Prepackage plugins
@for plugin_package in $(PLUGIN_PACKAGES) ; do \
ARCH="linux-amd64"; \
- #Download MMCTL for $(MMCTL_PLATFORM)
- scripts/download_mmctl_release.sh $(MMCTL_PLATFORM) $(DIST_PATH_GENERIC)/bin
+ @#Copy cross-compiled MMCTL
+ cp "${HOME}/go/src/github.com/mattermost/mmctl/mmctl" $(DIST_PATH_GENERIC)/bin
ifeq ("darwin_arm64","$(CURRENT_PACKAGE_ARCH)")
echo "No plugins yet for $(CURRENT_PACKAGE_ARCH) platform, skipping..."

View File

@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
set -eux
# build user
BUILD_USER_HOME="${BUILD_USER_HOME:-/build}"
@@ -6,12 +6,10 @@ BUILD_USER_NAME="${BUILD_USER_NAME:-build}"
# Debian release used during build
DEBIAN_RELEASE="${DEBIAN_RELEASE:-stretch}"
# Mattermost version to build
MATTERMOST_RELEASE="${MATTERMOST_RELEASE:-v5.4.0}"
# node key id and release
NODE_KEY="${NODE_KEY:-9FD3B784BC1C6FC31A8A0A1C1655A0AB68576280}"
NODE_RELEASE="${NODE_RELEASE:-10}"
MATTERMOST_RELEASE="${MATTERMOST_RELEASE:-v5.26.0}"
MMCTL_RELEASE="${MMCTL_RELEASE:-v5.26.0}"
# golang version
GO_VERSION="${GO_VERSION:-1.15.5}"
GO_VERSION="${GO_VERSION:-1.18.1}"
if [ "$(id -u)" -eq 0 ]; then # as root user
# create build user, if needed
@@ -33,21 +31,17 @@ if [ "$(id -u)" -eq 0 ]; then # as root user
apt-get update
# dependencies to setup repositories
apt-get install --quiet \
gnupg2 dirmngr apt-transport-https ca-certificates parallel
# receive missing key (retry on failure)
parallel --verbose --delay=30 --retries=5 "apt-key adv --keyserver 'ipv4.pool.sks-keyservers.net' --recv-keys '{}'" ::: "${NODE_KEY}"
gnupg2 dirmngr apt-transport-https ca-certificates curl
# add required additional repositories
printf 'deb-src http://deb.debian.org/debian %s main' "${DEBIAN_RELEASE}" \
> "/etc/apt/sources.list.d/${DEBIAN_RELEASE}-source.list"
printf 'deb http://deb.debian.org/debian %s-backports main' "${DEBIAN_RELEASE}" \
> "/etc/apt/sources.list.d/${DEBIAN_RELEASE}-backports.list"
printf 'deb https://deb.nodesource.com/node_%s.x %s main' "${NODE_RELEASE}" "${DEBIAN_RELEASE}" \
> '/etc/apt/sources.list.d/nodesource.list'
# update repositories
apt-get update
# install dependencies
apt-get install --quiet \
wget build-essential patch git nodejs
wget build-essential patch git python2
# install 'pngquant' build dependencies (required by node module)
apt-get build-dep --quiet \
pngquant
@@ -60,7 +54,7 @@ if [ "$(id -u)" -eq 0 ]; then # as root user
# FIXME go (executed by build user) writes to GOROOT
install --directory --owner="${BUILD_USER_NAME}" \
"$(go env GOROOT)/pkg/$(go env GOOS)_$(go env GOARCH)"
# switch to build user
# Re-invoke this build.sh script with the 'build' user
runuser -u "${BUILD_USER_NAME}" -- "${0}"
# salvage build artifacts
cp --verbose \
@@ -73,6 +67,12 @@ fi
export GOROOT=/usr/local/go
export PATH=$GOROOT/bin:$PATH
cd "${HOME}"
# install NVM
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
# download and extract Mattermost sources
for COMPONENT in server webapp; do
install --directory "${HOME}/go/src/github.com/mattermost/mattermost-${COMPONENT}"
@@ -81,6 +81,33 @@ for COMPONENT in server webapp; do
tar --directory="${HOME}/go/src/github.com/mattermost/mattermost-${COMPONENT}" \
--strip-components=1 --extract --file="mattermost-${COMPONENT}.tar.gz"
done
# install mattermost-webapp's required version of nodejs
pushd "${HOME}/go/src/github.com/mattermost/mattermost-webapp"
nvm install
popd
# prepare the go build environment
install --directory "${HOME}/go/bin"
if [ "$(go env GOOS)_$(go env GOARCH)" != 'linux_amd64' ]; then
ln --symbolic \
"${HOME}/go/bin/$(go env GOOS)_$(go env GOARCH)" \
"${HOME}/go/bin/linux_amd64"
fi
# build mmctl
install --directory "${HOME}/go/src/github.com/mattermost/mmctl"
wget --quiet --continue --output-document="mmctl.tar.gz" \
"https://github.com/mattermost/mmctl/archive/${MMCTL_RELEASE}.tar.gz"
tar --directory="${HOME}/go/src/github.com/mattermost/mmctl" \
--strip-components=1 --extract --file="mmctl.tar.gz"
find "${HOME}/go/src/github.com/mattermost/mmctl/" -type f -name '*.go' | xargs \
sed -i \
-e 's#//go:build linux || darwin#//go:build linux || darwin || dragonfly || freebsd || netbsd || openbsd#' \
-e 's#// +build linux darwin#// +build linux darwin dragonfly freebsd netbsd openbsd#'
make --directory="${HOME}/go/src/github.com/mattermost/mmctl" \
BUILD_NUMBER="dev-$(go env GOOS)-$(go env GOARCH)-${MMCTL_RELEASE}" \
ADVANCED_VET=0 \
GO="GOARCH= GOOS= $(command -v go)"
# build Mattermost webapp
npm set progress false
sed -i -e 's#--verbose#--display minimal#' \
@@ -88,12 +115,6 @@ sed -i -e 's#--verbose#--display minimal#' \
make --directory="${HOME}/go/src/github.com/mattermost/mattermost-webapp" \
build
# build Mattermost server
install --directory "${HOME}/go/bin"
if [ "$(go env GOOS)_$(go env GOARCH)" != 'linux_amd64' ]; then
ln --symbolic \
"${HOME}/go/bin/$(go env GOOS)_$(go env GOARCH)" \
"${HOME}/go/bin/linux_amd64"
fi
patch --directory="${HOME}/go/src/github.com/mattermost/mattermost-server" \
--strip=1 -t < "${HOME}/build-release.patch"
sed -i \

View File

@@ -1,3 +1,6 @@
package main
import _ "github.com/mattermost/mattermost-server/v5/model"
func main() {/* dummy file */}
import _ "github.com/mattermost/mattermost-server/v6/model"
import _ "github.com/mattermost/mmctl/commands"
func main() { /* dummy file */ }

View File

@@ -1,3 +1,8 @@
module github.com/SmartHoneybee/ubiquitous-memory/dependabot
require github.com/mattermost/mattermost-server/v5 v5.36.0
go 1.18
require (
github.com/mattermost/mattermost-server/v6 v7.5.2
github.com/mattermost/mmctl v0.0.0-20211221153052-1bb2fec4c15e
)