mirror of
https://github.com/SmartHoneybee/ubiquitous-memory
synced 2025-10-24 23:33:48 +02:00
Compare commits
32 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
acc0ef08cd | ||
|
|
860b28b652 | ||
|
|
1b49e25db7 | ||
|
|
542f871d30 | ||
|
|
b4bf8fc00e | ||
|
|
404ed7f60c | ||
|
|
890eb1c602 | ||
|
|
476501913c | ||
|
|
d5c44dd9a8 | ||
|
|
a624e66742 | ||
|
|
5d1eec08f2 | ||
|
|
b4bfed6058 | ||
|
|
155ef473dd | ||
|
|
69dda8131e | ||
|
|
a02a6b4386 | ||
|
|
3aec2b6302 | ||
|
|
cef04b0488 | ||
|
|
f3aa038f93 | ||
|
|
ce52eca004 | ||
|
|
06ac371c53 | ||
|
|
a55b21d6e7 | ||
|
|
ca9c6e47c5 | ||
|
|
89f37ddd12 | ||
|
|
a5c6a921e2 | ||
|
|
02f1846b2b | ||
|
|
362f5cf97f | ||
|
|
4b09124333 | ||
|
|
7332922733 | ||
|
|
605dd4992e | ||
|
|
f58b2018c4 | ||
|
|
f1204f044c | ||
|
|
43a100f30c |
76
.github/workflows/release.yml
vendored
76
.github/workflows/release.yml
vendored
@@ -9,81 +9,55 @@ env:
|
||||
DEBIAN_RELEASE: buster
|
||||
DOCKER_PWD: /root
|
||||
DOCKER_IMAGE: debian:${DEBIAN_RELEASE}
|
||||
GO_VERSION: 1.15.5
|
||||
GO_VERSION: 1.18.1
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
os: [dragonfly, freebsd, linux, netbsd, openbsd]
|
||||
arch: [amd64, arm, arm64, mips, mips64, mips64le, ppc64, ppc64le, s390x ]
|
||||
exclude:
|
||||
include:
|
||||
- os: dragonfly
|
||||
arch: amd64
|
||||
- os: freebsd
|
||||
arch: amd64
|
||||
- os: freebsd
|
||||
arch: arm
|
||||
- os: dragonfly
|
||||
- os: linux
|
||||
arch: arm
|
||||
- os: linux
|
||||
arch: arm64
|
||||
- os: dragonfly
|
||||
- os: linux
|
||||
arch: mips
|
||||
- os: dragonfly
|
||||
- os: linux
|
||||
arch: mips64
|
||||
- os: dragonfly
|
||||
- os: linux
|
||||
arch: mips64le
|
||||
- os: dragonfly
|
||||
- os: linux
|
||||
arch: mipsle
|
||||
- os: linux
|
||||
arch: ppc64
|
||||
- os: dragonfly
|
||||
- os: linux
|
||||
arch: ppc64le
|
||||
- os: dragonfly
|
||||
arch: s390x
|
||||
- os: freebsd
|
||||
arch: arm64
|
||||
- os: freebsd
|
||||
arch: mips
|
||||
- os: freebsd
|
||||
arch: mips64
|
||||
- os: freebsd
|
||||
arch: mips64le
|
||||
- os: freebsd
|
||||
arch: ppc64
|
||||
- os: freebsd
|
||||
arch: ppc64le
|
||||
- os: freebsd
|
||||
- os: linux
|
||||
arch: s390x
|
||||
- os: netbsd
|
||||
arch: arm64
|
||||
arch: amd64
|
||||
- os: netbsd
|
||||
arch: mips
|
||||
- os: netbsd
|
||||
arch: mips64
|
||||
- os: netbsd
|
||||
arch: mips64le
|
||||
- os: netbsd
|
||||
arch: ppc64
|
||||
- os: netbsd
|
||||
arch: ppc64le
|
||||
- os: netbsd
|
||||
arch: s390x
|
||||
arch: arm
|
||||
- os: openbsd
|
||||
arch: arm64
|
||||
arch: amd64
|
||||
- os: openbsd
|
||||
arch: mips
|
||||
- os: openbsd
|
||||
arch: mips64
|
||||
- os: openbsd
|
||||
arch: mips64le
|
||||
- os: openbsd
|
||||
arch: ppc64
|
||||
- os: openbsd
|
||||
arch: ppc64le
|
||||
- os: openbsd
|
||||
arch: s390x
|
||||
arch: arm
|
||||
|
||||
steps:
|
||||
- name: Clone repository
|
||||
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=v6.7.1" >> $GITHUB_ENV
|
||||
|
||||
- name: Pull docker image
|
||||
run: 'docker pull "${{ env.DOCKER_IMAGE }}"'
|
||||
@@ -92,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'
|
||||
|
||||
@@ -1,40 +1,24 @@
|
||||
diff --git a/build/release.mk b/build/release.mk
|
||||
index 3e9a11339..c8bd5409f 100644
|
||||
index faa027239..df40f0c68 100644
|
||||
--- a/build/release.mk
|
||||
+++ b/build/release.mk
|
||||
@@ -97,7 +97,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)
|
||||
@@ -126,7 +126,7 @@ endif
|
||||
|
||||
|
||||
@# ----- PLATFORM SPECIFIC -----
|
||||
-
|
||||
+_:
|
||||
@# Make osx package
|
||||
@# Copy binary
|
||||
ifeq ($(BUILDER_GOOS_GOARCH),"darwin_amd64")
|
||||
@@ -196,7 +196,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")
|
||||
@@ -207,7 +207,7 @@ else
|
||||
cp $(GOBIN)/linux_amd64/platform $(DIST_PATH)/bin # from cross-compiled bin dir
|
||||
@@ -99,7 +99,7 @@ package-prep:
|
||||
@# Resource directories
|
||||
mkdir -p $(DIST_PATH)/config
|
||||
cp -L config/README.md $(DIST_PATH)/config
|
||||
- OUTPUT_CONFIG=$(PWD)/$(DIST_PATH)/config/config.json go run ./scripts/config_generator
|
||||
+ OUTPUT_CONFIG=$(PWD)/$(DIST_PATH)/config/config.json GOOS= GOARCH= go run ./scripts/config_generator
|
||||
cp -RL fonts $(DIST_PATH)
|
||||
cp -RL templates $(DIST_PATH)
|
||||
rm -rf $(DIST_PATH)/templates/*.mjml $(DIST_PATH)/templates/partials/
|
||||
@@ -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..."
|
||||
|
||||
51
build.sh
51
build.sh
@@ -6,12 +6,13 @@ 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}"
|
||||
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:-10}"
|
||||
NODE_RELEASE="${NODE_RELEASE:-15}"
|
||||
# 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,9 +34,9 @@ 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
|
||||
# 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"
|
||||
@@ -47,7 +48,7 @@ if [ "$(id -u)" -eq 0 ]; then # as root user
|
||||
apt-get update
|
||||
# install dependencies
|
||||
apt-get install --quiet \
|
||||
wget build-essential patch git nodejs
|
||||
wget build-essential patch git nodejs python2
|
||||
# install 'pngquant' build dependencies (required by node module)
|
||||
apt-get build-dep --quiet \
|
||||
pngquant
|
||||
@@ -60,7 +61,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 \
|
||||
@@ -81,6 +82,27 @@ 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
|
||||
# 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 +110,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 \
|
||||
@@ -103,7 +119,12 @@ sed -i \
|
||||
"${HOME}/go/src/github.com/mattermost/mattermost-server/Makefile" \
|
||||
"${HOME}/go/src/github.com/mattermost/mattermost-server/build/release.mk"
|
||||
make --directory="${HOME}/go/src/github.com/mattermost/mattermost-server" \
|
||||
config-reset build-linux package-linux \
|
||||
config-reset \
|
||||
BUILD_NUMBER="dev-$(go env GOOS)-$(go env GOARCH)-${MATTERMOST_RELEASE}" \
|
||||
GO="GOARCH= GOOS= $(command -v go)" \
|
||||
PLUGIN_PACKAGES=''
|
||||
make --directory="${HOME}/go/src/github.com/mattermost/mattermost-server" \
|
||||
build-linux package-linux \
|
||||
BUILD_NUMBER="dev-$(go env GOOS)-$(go env GOARCH)-${MATTERMOST_RELEASE}" \
|
||||
GO="GOARCH=$(go env GOARCH) GOOS=$(go env GOOS) $(command -v go)" \
|
||||
PLUGIN_PACKAGES=''
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
package main
|
||||
import _ "github.com/mattermost/mattermost-server/model"
|
||||
func main() {/* dummy file */}
|
||||
|
||||
import _ "github.com/mattermost/mattermost-server/v6/model"
|
||||
import _ "github.com/mattermost/mmctl/commands"
|
||||
|
||||
func main() { /* dummy file */ }
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
module github.com/SmartHoneybee/ubiquitous-memory/dependabot
|
||||
|
||||
require github.com/mattermost/mattermost-server/v5 v5.35.3
|
||||
go 1.18
|
||||
|
||||
require (
|
||||
github.com/mattermost/mattermost-server/v6 v7.0.0
|
||||
github.com/mattermost/mmctl v0.0.0-20211221153052-1bb2fec4c15e
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user