1
0
mirror of https://github.com/SmartHoneybee/ubiquitous-memory synced 2025-10-24 15:23:49 +02:00

Compare commits

..

1 Commits

Author SHA1 Message Date
Pierre de La Morinerie
304ed7d646 Attempt to fix Dependabot detection 2021-11-28 09:05:02 +01:00
4 changed files with 26 additions and 35 deletions

View File

@@ -9,7 +9,7 @@ env:
DEBIAN_RELEASE: buster
DOCKER_PWD: /root
DOCKER_IMAGE: debian:${DEBIAN_RELEASE}
GO_VERSION: 1.18.1
GO_VERSION: 1.16.7
jobs:
build:
@@ -56,8 +56,8 @@ 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.5.2" >> $GITHUB_ENV
echo "MATTERMOST_RELEASE=$(grep 'mattermost-server' dependabot/go.mod | cut -d' ' -f3)" >> $GITHUB_ENV
echo "MMCTL_RELEASE=$(grep 'mmctl' dependabot/go.mod | cut -d' ' -f3)" >> $GITHUB_ENV
- name: Pull docker image
run: 'docker pull "${{ env.DOCKER_IMAGE }}"'

View File

@@ -1,8 +1,8 @@
diff --git a/build/release.mk b/build/release.mk
index faa027239..df40f0c68 100644
index 7f989d4b4..886119275 100644
--- a/build/release.mk
+++ b/build/release.mk
@@ -99,7 +99,7 @@ package-prep:
@@ -71,7 +71,7 @@ package-prep:
@# Resource directories
mkdir -p $(DIST_PATH)/config
cp -L config/README.md $(DIST_PATH)/config
@@ -11,14 +11,12 @@ index faa027239..df40f0c68 100644
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
@@ -201,7 +201,7 @@ else
cp $(GOBIN)/linux_amd64/mattermost $(DIST_PATH_LIN)/bin # from cross-compiled bin dir
endif
- #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..."
#Download MMCTL for Linux
- scripts/download_mmctl_release.sh "Linux" $(DIST_PATH_LIN)/bin
+ cp "${HOME}/go/src/github.com/mattermost/mmctl/mmctl" $(DIST_PATH_LIN)/bin
@# Prepackage plugins
@for plugin_package in $(PLUGIN_PACKAGES) ; do \
ARCH="linux-amd64"; \

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh
set -eux
# build user
BUILD_USER_HOME="${BUILD_USER_HOME:-/build}"
@@ -8,8 +8,11 @@ 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:-10}"
# golang version
GO_VERSION="${GO_VERSION:-1.18.1}"
GO_VERSION="${GO_VERSION:-1.16.7}"
if [ "$(id -u)" -eq 0 ]; then # as root user
# create build user, if needed
@@ -32,16 +35,20 @@ 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 python2
wget build-essential patch git nodejs
# install 'pngquant' build dependencies (required by node module)
apt-get build-dep --quiet \
pngquant
@@ -67,12 +74,6 @@ 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,12 +82,6 @@ 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

View File

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