mirror of
https://github.com/SmartHoneybee/ubiquitous-memory
synced 2025-10-26 00:03:48 +02:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
155ef473dd | ||
|
|
69dda8131e | ||
|
|
a02a6b4386 | ||
|
|
3aec2b6302 | ||
|
|
cef04b0488 | ||
|
|
f3aa038f93 | ||
|
|
ce52eca004 |
6
.github/workflows/release.yml
vendored
6
.github/workflows/release.yml
vendored
@@ -55,7 +55,9 @@ jobs:
|
|||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Set environment from runtime properties
|
- 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=$(grep 'mmctl' dependabot/go.mod | cut -d' ' -f2)" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Pull docker image
|
- name: Pull docker image
|
||||||
run: 'docker pull "${{ env.DOCKER_IMAGE }}"'
|
run: 'docker pull "${{ env.DOCKER_IMAGE }}"'
|
||||||
@@ -64,7 +66,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
GOOS: ${{ matrix.os }}
|
GOOS: ${{ matrix.os }}
|
||||||
GOARCH: ${{ matrix.arch }}
|
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
|
- name: Tag release
|
||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/master'
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
diff --git a/build/release.mk b/build/release.mk
|
diff --git a/build/release.mk b/build/release.mk
|
||||||
index 7f989d4b4..886119275 100644
|
index faa027239..df40f0c68 100644
|
||||||
--- a/build/release.mk
|
--- a/build/release.mk
|
||||||
+++ b/build/release.mk
|
+++ b/build/release.mk
|
||||||
@@ -71,7 +71,7 @@ package-prep:
|
@@ -99,7 +99,7 @@ package-prep:
|
||||||
@# Resource directories
|
@# Resource directories
|
||||||
mkdir -p $(DIST_PATH)/config
|
mkdir -p $(DIST_PATH)/config
|
||||||
cp -L config/README.md $(DIST_PATH)/config
|
cp -L config/README.md $(DIST_PATH)/config
|
||||||
@@ -11,12 +11,14 @@ index 7f989d4b4..886119275 100644
|
|||||||
cp -RL fonts $(DIST_PATH)
|
cp -RL fonts $(DIST_PATH)
|
||||||
cp -RL templates $(DIST_PATH)
|
cp -RL templates $(DIST_PATH)
|
||||||
rm -rf $(DIST_PATH)/templates/*.mjml $(DIST_PATH)/templates/partials/
|
rm -rf $(DIST_PATH)/templates/*.mjml $(DIST_PATH)/templates/partials/
|
||||||
@@ -201,7 +201,7 @@ else
|
@@ -159,8 +159,8 @@ else
|
||||||
cp $(GOBIN)/linux_amd64/mattermost $(DIST_PATH_LIN)/bin # from cross-compiled bin dir
|
cp $(GOBIN)/$(CURRENT_PACKAGE_ARCH)/$(MM_BIN_NAME) $(DIST_PATH_GENERIC)/bin # from cross-compiled bin dir
|
||||||
endif
|
endif
|
||||||
#Download MMCTL for Linux
|
|
||||||
- scripts/download_mmctl_release.sh "Linux" $(DIST_PATH_LIN)/bin
|
- #Download MMCTL for $(MMCTL_PLATFORM)
|
||||||
+ #scripts/download_mmctl_release.sh "Linux" $(DIST_PATH_LIN)/bin
|
- scripts/download_mmctl_release.sh $(MMCTL_PLATFORM) $(DIST_PATH_GENERIC)/bin
|
||||||
@# Prepackage plugins
|
+ @#Copy cross-compiled MMCTL
|
||||||
@for plugin_package in $(PLUGIN_PACKAGES) ; do \
|
+ cp "${HOME}/go/src/github.com/mattermost/mmctl/mmctl" $(DIST_PATH_GENERIC)/bin
|
||||||
ARCH="linux-amd64"; \
|
|
||||||
|
ifeq ("darwin_arm64","$(CURRENT_PACKAGE_ARCH)")
|
||||||
|
echo "No plugins yet for $(CURRENT_PACKAGE_ARCH) platform, skipping..."
|
||||||
|
|||||||
36
build.sh
36
build.sh
@@ -6,10 +6,11 @@ BUILD_USER_NAME="${BUILD_USER_NAME:-build}"
|
|||||||
# Debian release used during build
|
# Debian release used during build
|
||||||
DEBIAN_RELEASE="${DEBIAN_RELEASE:-stretch}"
|
DEBIAN_RELEASE="${DEBIAN_RELEASE:-stretch}"
|
||||||
# Mattermost version to build
|
# 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 id and release
|
||||||
NODE_KEY="${NODE_KEY:-9FD3B784BC1C6FC31A8A0A1C1655A0AB68576280}"
|
NODE_KEY="${NODE_KEY:-9FD3B784BC1C6FC31A8A0A1C1655A0AB68576280}"
|
||||||
NODE_RELEASE="${NODE_RELEASE:-10}"
|
NODE_RELEASE="${NODE_RELEASE:-15}"
|
||||||
# golang version
|
# golang version
|
||||||
GO_VERSION="${GO_VERSION:-1.16.7}"
|
GO_VERSION="${GO_VERSION:-1.16.7}"
|
||||||
|
|
||||||
@@ -47,7 +48,7 @@ if [ "$(id -u)" -eq 0 ]; then # as root user
|
|||||||
apt-get update
|
apt-get update
|
||||||
# install dependencies
|
# install dependencies
|
||||||
apt-get install --quiet \
|
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)
|
# install 'pngquant' build dependencies (required by node module)
|
||||||
apt-get build-dep --quiet \
|
apt-get build-dep --quiet \
|
||||||
pngquant
|
pngquant
|
||||||
@@ -60,7 +61,7 @@ if [ "$(id -u)" -eq 0 ]; then # as root user
|
|||||||
# FIXME go (executed by build user) writes to GOROOT
|
# FIXME go (executed by build user) writes to GOROOT
|
||||||
install --directory --owner="${BUILD_USER_NAME}" \
|
install --directory --owner="${BUILD_USER_NAME}" \
|
||||||
"$(go env GOROOT)/pkg/$(go env GOOS)_$(go env GOARCH)"
|
"$(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}"
|
runuser -u "${BUILD_USER_NAME}" -- "${0}"
|
||||||
# salvage build artifacts
|
# salvage build artifacts
|
||||||
cp --verbose \
|
cp --verbose \
|
||||||
@@ -81,6 +82,27 @@ for COMPONENT in server webapp; do
|
|||||||
tar --directory="${HOME}/go/src/github.com/mattermost/mattermost-${COMPONENT}" \
|
tar --directory="${HOME}/go/src/github.com/mattermost/mattermost-${COMPONENT}" \
|
||||||
--strip-components=1 --extract --file="mattermost-${COMPONENT}.tar.gz"
|
--strip-components=1 --extract --file="mattermost-${COMPONENT}.tar.gz"
|
||||||
done
|
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
|
# build Mattermost webapp
|
||||||
npm set progress false
|
npm set progress false
|
||||||
sed -i -e 's#--verbose#--display minimal#' \
|
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" \
|
make --directory="${HOME}/go/src/github.com/mattermost/mattermost-webapp" \
|
||||||
build
|
build
|
||||||
# build Mattermost server
|
# 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" \
|
patch --directory="${HOME}/go/src/github.com/mattermost/mattermost-server" \
|
||||||
--strip=1 -t < "${HOME}/build-release.patch"
|
--strip=1 -t < "${HOME}/build-release.patch"
|
||||||
sed -i \
|
sed -i \
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import _ "github.com/mattermost/mattermost-server/v6/model"
|
import _ "github.com/mattermost/mattermost-server/v6/model"
|
||||||
|
import _ "github.com/mattermost/mmctl/commands"
|
||||||
|
|
||||||
func main() { /* dummy file */ }
|
func main() { /* dummy file */ }
|
||||||
|
|||||||
@@ -2,4 +2,7 @@ module github.com/SmartHoneybee/ubiquitous-memory/dependabot
|
|||||||
|
|
||||||
go 1.16
|
go 1.16
|
||||||
|
|
||||||
require github.com/mattermost/mattermost-server/v6 v6.0.0
|
require (
|
||||||
|
github.com/mattermost/mattermost-server/v6 v6.3.1
|
||||||
|
github.com/mattermost/mmctl v6.3.0
|
||||||
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user