mirror of
https://github.com/SmartHoneybee/ubiquitous-memory
synced 2025-10-24 07:13:46 +02:00
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.
This commit is contained in:
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@@ -57,7 +57,7 @@ jobs:
|
||||
- name: Set environment from runtime properties
|
||||
run: |
|
||||
echo "MATTERMOST_RELEASE=$(grep 'mattermost-server' dependabot/go.mod | cut -d' ' -f2)" >> $GITHUB_ENV
|
||||
echo "MMCTL_RELEASE=v7.2.0" >> $GITHUB_ENV
|
||||
echo "MMCTL_RELEASE=v7.3.0" >> $GITHUB_ENV
|
||||
|
||||
- name: Pull docker image
|
||||
run: 'docker pull "${{ env.DOCKER_IMAGE }}"'
|
||||
|
23
build.sh
23
build.sh
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
set -eux
|
||||
# build user
|
||||
BUILD_USER_HOME="${BUILD_USER_HOME:-/build}"
|
||||
@@ -8,9 +8,6 @@ DEBIAN_RELEASE="${DEBIAN_RELEASE:-stretch}"
|
||||
# Mattermost version to build
|
||||
MATTERMOST_RELEASE="${MATTERMOST_RELEASE:-v5.26.0}"
|
||||
MMCTL_RELEASE="${MMCTL_RELEASE:-v5.26.0}"
|
||||
# node key id and release
|
||||
NODE_KEY="${NODE_KEY:-9FD3B784BC1C6FC31A8A0A1C1655A0AB68576280}"
|
||||
NODE_RELEASE="${NODE_RELEASE:-16}"
|
||||
# golang version
|
||||
GO_VERSION="${GO_VERSION:-1.18.1}"
|
||||
|
||||
@@ -35,20 +32,16 @@ if [ "$(id -u)" -eq 0 ]; then # as root user
|
||||
# dependencies to setup repositories
|
||||
apt-get install --quiet \
|
||||
gnupg2 dirmngr apt-transport-https ca-certificates curl
|
||||
# receive missing key
|
||||
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
|
||||
# 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 python2
|
||||
wget build-essential patch git python2
|
||||
# install 'pngquant' build dependencies (required by node module)
|
||||
apt-get build-dep --quiet \
|
||||
pngquant
|
||||
@@ -74,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}"
|
||||
@@ -82,6 +81,12 @@ 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
|
||||
|
@@ -3,6 +3,6 @@ module github.com/SmartHoneybee/ubiquitous-memory/dependabot
|
||||
go 1.18
|
||||
|
||||
require (
|
||||
github.com/mattermost/mattermost-server/v6 v7.2.0
|
||||
github.com/mattermost/mattermost-server/v6 v7.3.0
|
||||
github.com/mattermost/mmctl v0.0.0-20211221153052-1bb2fec4c15e
|
||||
)
|
||||
|
Reference in New Issue
Block a user