mirror of
https://github.com/wekan/wekan.git
synced 2026-11-18 05:45:02 -05:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3608d4b657 | ||
|
|
7c1ee7f161 | ||
|
|
d978d626ae | ||
|
|
1059164255 | ||
|
|
741668a831 | ||
|
|
5f06ebfaec | ||
|
|
b5e79b37ed | ||
|
|
7076ce5df3 | ||
|
|
3e00b2ccc2 | ||
|
|
5681592572 | ||
|
|
87dcfdbff6 |
No files matched your search
@@ -26,6 +26,43 @@ Versions:
|
||||
- WeKan 8.00-8.06 had wrong raw database directory setting /var/snap/wekan/common/wekan and some cards were not visible,
|
||||
it was fixed at WeKan 8.07 where database directory is back to /var/snap/wekan/common and all cards are visible.
|
||||
|
||||
# v9.26 2026-05-22 WeKan ® release
|
||||
|
||||
This release adds the following update:
|
||||
|
||||
- [Use Ubuntu 26.04 base for amd64 and arm64 at Docker and Snap](https://github.com/wekan/wekan/commit/d978d626aed308553955037e0e906f44566a295d).
|
||||
Thanks to xet7.
|
||||
|
||||
and fixes the following bugs:
|
||||
|
||||
- [Try to fix Snap: Use local npm package cache to prevent local build timeout](https://github.com/wekan/wekan/commit/741668a831d7775c34fca68d7b3a63421ae72f13).
|
||||
Thanks to xet7.
|
||||
|
||||
Thanks to above GitHub users for their contributions and translators for their translations.
|
||||
|
||||
# v9.25 2026-05-22 WeKan ® release
|
||||
|
||||
This release fixes the following bugs:
|
||||
|
||||
- [Try to fix Snap](https://github.com/wekan/wekan/commit/b5e79b37ed88676751394465d81249ad7bbf2841).
|
||||
Thanks to xet7.
|
||||
|
||||
Thanks to above GitHub users for their contributions and translators for their translations.
|
||||
|
||||
# v9.24 2026-05-22 WeKan ® release
|
||||
|
||||
This release adds the following updates:
|
||||
|
||||
- [Build scripts: Updated local IP address](https://github.com/wekan/wekan/commit/87dcfdbff646e642f0bd760bc76aa3de6983961e).
|
||||
Thanks to xet7.
|
||||
|
||||
and fixes the following bugs:
|
||||
|
||||
- [Fix Snap pidFilePath](https://github.com/wekan/wekan/commit/56815925728f4e82fabff969e086c7f015c89c9c).
|
||||
Thanks to csonkaoszimt and xet7.
|
||||
|
||||
Thanks to above GitHub users for their contributions and translators for their translations.
|
||||
|
||||
# v9.23 2026-05-21 WeKan ® release
|
||||
|
||||
This release fixes the following CRITICAL SECURITY ISSUES: https://wekan.fi/hall-of-fame/bflableed/ :
|
||||
|
||||
+4
-4
@@ -1,20 +1,20 @@
|
||||
FROM ubuntu:24.04
|
||||
FROM ubuntu:26.04
|
||||
LABEL maintainer="wekan"
|
||||
LABEL org.opencontainers.image.ref.name="ubuntu"
|
||||
LABEL org.opencontainers.image.version="24.04"
|
||||
LABEL org.opencontainers.image.version="26.04"
|
||||
LABEL org.opencontainers.image.source="https://github.com/wekan/wekan"
|
||||
|
||||
# TARGETARCH and TARGETVARIANT are automatically provided by Docker Buildx
|
||||
ARG TARGETARCH
|
||||
ARG TARGETVARIANT
|
||||
ARG VERSION=9.23
|
||||
ARG VERSION=9.26
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
ENV BUILD_DEPS="apt-utils gnupg wget bzip2 g++ curl libarchive-tools build-essential git ca-certificates python3 unzip"
|
||||
|
||||
ENV \
|
||||
DEBUG=false \
|
||||
NODE_VERSION=v24.15.0 \
|
||||
NODE_VERSION=v24.16.0 \
|
||||
METEOR_RELEASE=METEOR@3.5-beta.10 \
|
||||
USE_EDGE=false \
|
||||
NPM_VERSION=11.11.0 \
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
appId: wekan-public/apps/77b94f60-dec9-0136-304e-16ff53095928
|
||||
appVersion: "v9.23.0"
|
||||
appVersion: "v9.26.0"
|
||||
files:
|
||||
userUploads:
|
||||
- README.md
|
||||
|
||||
@@ -10,7 +10,7 @@ This is without container (without Docker or Snap).
|
||||
|
||||
Right click and download files 1-4:
|
||||
|
||||
1. [wekan-9.23-win64.zip](https://github.com/wekan/wekan/releases/download/v9.23/wekan-9.23-win64.zip) or newest available at https://github.com/wekan/wekan/releases/
|
||||
1. [wekan-9.26-win64.zip](https://github.com/wekan/wekan/releases/download/v9.26/wekan-9.26-win64.zip) or newest available at https://github.com/wekan/wekan/releases/
|
||||
2. [node.exe](https://nodejs.org/dist/latest-v24.x/win-x64/node.exe)
|
||||
|
||||
3. [mongodb-windows-x86_64-7.0.32-signed.msi](https://fastdl.mongodb.org/windows/mongodb-windows-x86_64-7.0.32-signed.msi)
|
||||
@@ -21,7 +21,7 @@ Right click and download files 1-4:
|
||||
|
||||
6. Double click `mongodb-windows-x86_64-7.0.32-signed.msi` . In installer, uncheck downloading MongoDB compass.
|
||||
|
||||
7. Unzip `wekan-9.23-win64.zip` , inside it is directory `bundle`, to it copy other files:
|
||||
7. Unzip `wekan-9.26-win64.zip` , inside it is directory `bundle`, to it copy other files:
|
||||
|
||||
```
|
||||
bundle (directory)
|
||||
|
||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "wekan",
|
||||
"version": "v9.23.0",
|
||||
"version": "v9.26.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "wekan",
|
||||
"version": "v9.23.0",
|
||||
"version": "v9.26.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@aws-sdk/client-s3": "^3.1019.0",
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "wekan",
|
||||
"version": "v9.23.0",
|
||||
"version": "v9.26.0",
|
||||
"description": "Open-Source kanban",
|
||||
"private": true,
|
||||
"repository": {
|
||||
|
||||
Regular → Executable
File mode changed.
+5
-3
@@ -1,5 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
# Release script for wekan.
|
||||
|
||||
# 1) Check that there is only one parameter
|
||||
@@ -15,9 +17,9 @@ fi
|
||||
# 2) Commit and push version number changes
|
||||
cd ~/repos/wekan
|
||||
|
||||
~/repos/wekan/releases/version.sh $1 $2
|
||||
~/repos/wekan/releases/version.sh "$1" "$2"
|
||||
|
||||
~/repos/wekan/releases/release-bundle.sh $2
|
||||
~/repos/wekan/releases/release-bundle.sh "$2"
|
||||
|
||||
git add --all
|
||||
git add package-lock.json
|
||||
@@ -25,7 +27,7 @@ git commit -m "v$2"
|
||||
git push
|
||||
|
||||
# 3) Add release tag
|
||||
~/repos/wekan/releases/add-tag.sh v$2
|
||||
~/repos/wekan/releases/add-tag.sh "v$2"
|
||||
|
||||
# 4) Push to repo
|
||||
git push
|
||||
|
||||
+26
-3
@@ -1,8 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
USE_LOCAL_SNAPCRAFT="true"
|
||||
|
||||
echo "First run: snapcraft login"
|
||||
echo "Then run this script"
|
||||
|
||||
echo "Using releases/snapcraft-local.yaml (local mirror mode)"
|
||||
|
||||
if ! grep -qE '^[[:space:]]*npm install[[:space:]]*$' releases/snapcraft-local.yaml; then
|
||||
echo "ERROR: releases/snapcraft-local.yaml is missing standalone 'npm install' step."
|
||||
echo "Refusing to continue because Snap may miss server npm modules."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ "$OSTYPE" == "linux-gnu" ]]; then
|
||||
echo "Linux - building with LXD"
|
||||
|
||||
@@ -12,8 +24,20 @@ if [[ "$OSTYPE" == "linux-gnu" ]]; then
|
||||
sudo systemctl start snapd
|
||||
sudo snap install snapcraft --classic
|
||||
sudo snap install lxd
|
||||
# Use local cached versions of packages
|
||||
cp releases/snapcraft-local.yaml snapcraft.yaml
|
||||
SNAPCRAFT_FILE_BACKUP=""
|
||||
cleanup_snapcraft_file() {
|
||||
if [[ -n "$SNAPCRAFT_FILE_BACKUP" && -f "$SNAPCRAFT_FILE_BACKUP" ]]; then
|
||||
mv -f "$SNAPCRAFT_FILE_BACKUP" snapcraft.yaml
|
||||
fi
|
||||
}
|
||||
trap cleanup_snapcraft_file EXIT
|
||||
|
||||
# Only override snapcraft.yaml when explicitly requested.
|
||||
if [[ "$USE_LOCAL_SNAPCRAFT" == "true" ]]; then
|
||||
SNAPCRAFT_FILE_BACKUP="$(mktemp snapcraft.yaml.backup.XXXXXX)"
|
||||
cp snapcraft.yaml "$SNAPCRAFT_FILE_BACKUP"
|
||||
cp releases/snapcraft-local.yaml snapcraft.yaml
|
||||
fi
|
||||
|
||||
# Initialize LXD if it hasn't been done yet
|
||||
sudo lxd init --auto
|
||||
@@ -40,7 +64,6 @@ if [[ "$OSTYPE" == "linux-gnu" ]]; then
|
||||
|
||||
# Force snapcraft to use a clean LXD environment
|
||||
snapcraft pack --use-lxd
|
||||
git checkout -- snapcraft.yaml
|
||||
exit;
|
||||
|
||||
elif [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
name: wekan
|
||||
version: '9.23'
|
||||
base: core24
|
||||
version: '9.26'
|
||||
base: core26
|
||||
summary: Open Source kanban
|
||||
description: |
|
||||
WeKan ® is an Open Source and collaborative kanban board application.
|
||||
@@ -27,11 +27,14 @@ environment:
|
||||
SNAP_COMMON: "/var/snap/$SNAP_INSTANCE_NAME/common"
|
||||
SNAP: "/snap/$SNAP_INSTANCE_NAME/$SNAP_REVISION"
|
||||
|
||||
# Use platforms instead of architectures for core24 base
|
||||
# Use platforms instead of architectures for core26 base
|
||||
platforms:
|
||||
amd64:
|
||||
build-on: amd64
|
||||
build-for: amd64
|
||||
arm64:
|
||||
build-on: arm64
|
||||
build-for: arm64
|
||||
|
||||
plugs:
|
||||
mongodb-plug:
|
||||
@@ -85,9 +88,8 @@ apps:
|
||||
|
||||
parts:
|
||||
mongodb:
|
||||
plugin: nil
|
||||
#source: https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2204-7.0.34.tgz
|
||||
source: http://192.168.1.20:8000/mongodb-linux-x86_64-ubuntu2204-7.0.34.tgz
|
||||
plugin: dump
|
||||
stage-packages:
|
||||
- libssl3
|
||||
- libcurl4
|
||||
@@ -102,6 +104,18 @@ parts:
|
||||
- libboost-filesystem1.74.0
|
||||
- libboost-program-options1.74.0
|
||||
- libgoogle-perftools4
|
||||
override-build: |
|
||||
set -eu
|
||||
case "${CRAFT_ARCH_BUILD_FOR}" in
|
||||
amd64) MONGO_ARCH="x86_64" ;;
|
||||
arm64) MONGO_ARCH="aarch64" ;;
|
||||
*) echo "Unsupported architecture: ${CRAFT_ARCH_BUILD_FOR}"; exit 1 ;;
|
||||
esac
|
||||
MONGO_URL="http://192.168.1.47:8000/mongodb-linux-${MONGO_ARCH}-ubuntu2204-7.0.34.tgz"
|
||||
wget -O mongodb.tgz "$MONGO_URL"
|
||||
tar -xzf mongodb.tgz --strip-components=1
|
||||
mkdir -p "$SNAPCRAFT_PART_INSTALL/bin"
|
||||
cp -a bin/* "$SNAPCRAFT_PART_INSTALL/bin/"
|
||||
stage:
|
||||
- bin
|
||||
- usr
|
||||
@@ -110,20 +124,42 @@ parts:
|
||||
- usr
|
||||
|
||||
mongosh:
|
||||
plugin: nil
|
||||
#source: https://downloads.mongodb.com/compass/mongosh-2.8.2-linux-x64.tgz
|
||||
source: http://192.168.1.20:8000/mongosh-2.8.2-linux-x64.tgz
|
||||
plugin: dump
|
||||
override-build: |
|
||||
set -eu
|
||||
case "${CRAFT_ARCH_BUILD_FOR}" in
|
||||
amd64) MONGOSH_ARCH="x64" ;;
|
||||
arm64) MONGOSH_ARCH="arm64" ;;
|
||||
*) echo "Unsupported architecture: ${CRAFT_ARCH_BUILD_FOR}"; exit 1 ;;
|
||||
esac
|
||||
MONGOSH_URL="http://192.168.1.47:8000/mongosh-2.8.2-linux-${MONGOSH_ARCH}.tgz"
|
||||
wget -O mongosh.tgz "$MONGOSH_URL"
|
||||
tar -xzf mongosh.tgz --strip-components=1
|
||||
mkdir -p "$SNAPCRAFT_PART_INSTALL/bin"
|
||||
cp -a bin/* "$SNAPCRAFT_PART_INSTALL/bin/"
|
||||
|
||||
mongotools:
|
||||
plugin: nil
|
||||
#source: https://fastdl.mongodb.org/tools/db/mongodb-database-tools-ubuntu2204-x86_64-100.16.0.tgz
|
||||
source: http://192.168.1.20:8000/mongodb-database-tools-ubuntu2204-x86_64-100.16.0.tgz
|
||||
plugin: dump
|
||||
override-build: |
|
||||
set -eu
|
||||
case "${CRAFT_ARCH_BUILD_FOR}" in
|
||||
amd64) TOOLS_ARCH="x86_64" ;;
|
||||
arm64) TOOLS_ARCH="arm64" ;;
|
||||
*) echo "Unsupported architecture: ${CRAFT_ARCH_BUILD_FOR}"; exit 1 ;;
|
||||
esac
|
||||
TOOLS_URL="http://192.168.1.47:8000/mongodb-database-tools-ubuntu2204-${TOOLS_ARCH}-100.16.0.tgz"
|
||||
wget -O mongotools.tgz "$TOOLS_URL"
|
||||
tar -xzf mongotools.tgz --strip-components=1
|
||||
mkdir -p "$SNAPCRAFT_PART_INSTALL/bin"
|
||||
cp -a bin/* "$SNAPCRAFT_PART_INSTALL/bin/"
|
||||
|
||||
|
||||
wekan:
|
||||
source: .
|
||||
plugin: npm
|
||||
npm-node-version: 24.15.0
|
||||
npm-node-version: 24.16.0
|
||||
npm-include-node: true
|
||||
build-packages:
|
||||
- build-essential
|
||||
@@ -141,42 +177,61 @@ parts:
|
||||
stage-packages:
|
||||
- libfontconfig1
|
||||
override-build: |
|
||||
npm config set registry http://192.168.1.20:4873/
|
||||
set -eu
|
||||
case "${CRAFT_ARCH_BUILD_FOR}" in
|
||||
amd64)
|
||||
WEKAN_ARCH="amd64"
|
||||
NODE_ARCH="x64"
|
||||
;;
|
||||
arm64)
|
||||
WEKAN_ARCH="arm64"
|
||||
NODE_ARCH="arm64"
|
||||
;;
|
||||
*)
|
||||
echo "Unsupported architecture: ${CRAFT_ARCH_BUILD_FOR}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
WEKAN_ZIP="wekan-9.26-${WEKAN_ARCH}.zip"
|
||||
NODE_TAR="node-v24.15.0-linux-${NODE_ARCH}.tar.xz"
|
||||
export NPM_CONFIG_REGISTRY="http://192.168.1.47:4873/"
|
||||
npm config set registry "$NPM_CONFIG_REGISTRY" --location=user
|
||||
echo "npm registry in use: $(npm config get registry)"
|
||||
echo "Cleaning environment first"
|
||||
rm -rf .build
|
||||
mkdir .build
|
||||
cd .build
|
||||
#wget https://github.com/wekan/wekan/releases/download/v9.23/wekan-9.23-amd64.zip
|
||||
wget http://192.168.1.20:8000/wekan-9.23-amd64.zip
|
||||
unzip wekan-9.23-amd64.zip
|
||||
rm wekan-9.23-amd64.zip
|
||||
#wget https://github.com/wekan/wekan/releases/download/v9.26/wekan-9.26-amd64.zip
|
||||
wget "http://192.168.1.47:8000/${WEKAN_ZIP}"
|
||||
unzip "${WEKAN_ZIP}"
|
||||
rm "${WEKAN_ZIP}"
|
||||
# Fix: bcrypt 5.0.1 (Meteor accounts-password) ships node-addon-api@3
|
||||
# which fails to compile on Node.js 24. Replace with bcrypt 6.0.0.
|
||||
#BCRYPT_DIR="bundle/programs/server/npm/node_modules/meteor/accounts-password/node_modules/bcrypt"
|
||||
#if [ -d "$BCRYPT_DIR" ]; then
|
||||
# rm -rf "$BCRYPT_DIR"
|
||||
# TMP=$(mktemp -d)
|
||||
# pushd "$TMP" > /dev/null
|
||||
# npm pack bcrypt@6.0.0
|
||||
# mkdir bcrypt && tar xzf bcrypt-*.tgz --strip-components=1 -C bcrypt
|
||||
# cd bcrypt && npm install --ignore-scripts && cd ..
|
||||
# popd > /dev/null
|
||||
# cp -a "$TMP/bcrypt" "$BCRYPT_DIR"
|
||||
# rm -rf "$TMP"
|
||||
#fi
|
||||
#cd bundle/programs/server
|
||||
#rm -rf node_modules
|
||||
#npm install
|
||||
#cd ../../../..
|
||||
BCRYPT_DIR="bundle/programs/server/npm/node_modules/meteor/accounts-password/node_modules/bcrypt"
|
||||
if [ -d "$BCRYPT_DIR" ]; then
|
||||
rm -rf "$BCRYPT_DIR"
|
||||
TMP=$(mktemp -d)
|
||||
pushd "$TMP" > /dev/null
|
||||
npm pack bcrypt@6.0.0 --registry "$NPM_CONFIG_REGISTRY"
|
||||
mkdir bcrypt && tar xzf bcrypt-*.tgz --strip-components=1 -C bcrypt
|
||||
cd bcrypt && npm install --ignore-scripts --registry "$NPM_CONFIG_REGISTRY" && cd ..
|
||||
popd > /dev/null
|
||||
cp -a "$TMP/bcrypt" "$BCRYPT_DIR"
|
||||
rm -rf "$TMP"
|
||||
fi
|
||||
cd bundle/programs/server
|
||||
rm -rf node_modules
|
||||
npm install --registry "$NPM_CONFIG_REGISTRY"
|
||||
cd ../../../..
|
||||
cd ..
|
||||
# Copy to Snap
|
||||
#wget https://nodejs.org/dist/latest-v24.x/node-v24.15.0-linux-x64.tar.xz
|
||||
wget http://192.168.1.20:8000/node-v24.15.0-linux-x64.tar.xz
|
||||
tar -xf node-v24.15.0-linux-x64.tar.xz node-v24.15.0-linux-x64/bin/node
|
||||
rm node-v24.15.0-linux-x64.tar.xz
|
||||
#wget https://nodejs.org/dist/latest-v24.x/node-v24.15.0-linux-x64.tar.xz
|
||||
wget "http://192.168.1.47:8000/${NODE_TAR}"
|
||||
tar -xf "${NODE_TAR}" "node-v24.15.0-linux-${NODE_ARCH}/bin/node"
|
||||
rm "${NODE_TAR}"
|
||||
mkdir $SNAPCRAFT_PART_INSTALL/bin
|
||||
cp -p node-v24.15.0-linux-x64/bin/node $SNAPCRAFT_PART_INSTALL/bin/
|
||||
rm -rf node-v24.15.0-linux-x64
|
||||
cp -p "node-v24.15.0-linux-${NODE_ARCH}/bin/node" $SNAPCRAFT_PART_INSTALL/bin/
|
||||
rm -rf "node-v24.15.0-linux-${NODE_ARCH}"
|
||||
cp -r .build/bundle/* $SNAPCRAFT_PART_INSTALL/
|
||||
cp .build/bundle/.node_version.txt $SNAPCRAFT_PART_INSTALL/
|
||||
rm -f $SNAPCRAFT_PART_INSTALL/lib/node_modules/wekan
|
||||
|
||||
+206
-42
@@ -1,10 +1,18 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
# =================================================================
|
||||
# WEKAN VERSION UPDATE SCRIPT
|
||||
# WEKAN VERSION + DEPENDENCY UPDATE SCRIPT
|
||||
# Supports: Linux (Bash/Zsh) and macOS (Zsh)
|
||||
# =================================================================
|
||||
|
||||
set -e # Exit on any error
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
||||
cd "$REPO_ROOT"
|
||||
|
||||
# Local HTTP cache used by releases/snapcraft-local.yaml.
|
||||
CACHE_BASE_URL="${CACHE_BASE_URL:-http://192.168.1.47:8000}"
|
||||
DOWNLOAD_DIR="${DOWNLOAD_DIR:-$HOME/Lataukset}"
|
||||
|
||||
# Portable sedi function for macOS/Linux compatibility
|
||||
sedi() {
|
||||
@@ -17,57 +25,191 @@ sedi() {
|
||||
fi
|
||||
}
|
||||
|
||||
http_ok() {
|
||||
local url="$1"
|
||||
local code
|
||||
code=$(curl -sS -o /dev/null -w "%{http_code}" -L --head --max-time 30 "$url" || true)
|
||||
[[ "$code" == "200" || "$code" == "301" || "$code" == "302" ]]
|
||||
}
|
||||
|
||||
latest_common_version() {
|
||||
local listing_url="$1"
|
||||
local extract_regex="$2"
|
||||
local version_sed="$3"
|
||||
local amd64_url_fmt="$4"
|
||||
local arm64_url_fmt="$5"
|
||||
local found=""
|
||||
|
||||
local listing
|
||||
listing=$(curl -fsSL "$listing_url" 2>/dev/null || true)
|
||||
if [ -z "$listing" ]; then
|
||||
echo "[WARN] Could not fetch listing from $listing_url. Falling back to existing file versions." >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
# shellcheck disable=SC2207
|
||||
local versions=($(echo "$listing" | grep -oE "$extract_regex" | sed -E "$version_sed" | sort -Vu))
|
||||
if [ ${#versions[@]} -eq 0 ]; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
local i
|
||||
for (( i=${#versions[@]}-1; i>=0; i-- )); do
|
||||
local v="${versions[$i]}"
|
||||
local amd64_url arm64_url
|
||||
printf -v amd64_url "$amd64_url_fmt" "$v"
|
||||
printf -v arm64_url "$arm64_url_fmt" "$v"
|
||||
if http_ok "$amd64_url" && http_ok "$arm64_url"; then
|
||||
found="$v"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -z "$found" ]; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
echo "$found"
|
||||
}
|
||||
|
||||
get_current_version_from_file() {
|
||||
local file="$1"
|
||||
local regex="$2"
|
||||
grep -oE "$regex" "$file" | head -1
|
||||
}
|
||||
|
||||
ensure_cache_or_download() {
|
||||
local filename="$1"
|
||||
local upstream_url="$2"
|
||||
local cache_url="${CACHE_BASE_URL}/${filename}"
|
||||
|
||||
if http_ok "$cache_url"; then
|
||||
echo "[CACHE] OK: $cache_url"
|
||||
return 0
|
||||
fi
|
||||
|
||||
mkdir -p "$DOWNLOAD_DIR"
|
||||
|
||||
if [ -f "$DOWNLOAD_DIR/$filename" ]; then
|
||||
echo "[DOWNLOAD] Already exists: $DOWNLOAD_DIR/$filename"
|
||||
return 0
|
||||
fi
|
||||
|
||||
echo "[CACHE] MISSING: $cache_url"
|
||||
echo "[DOWNLOAD] Fetching: $upstream_url"
|
||||
curl -fL --retry 3 --retry-delay 2 -o "$DOWNLOAD_DIR/$filename" "$upstream_url"
|
||||
}
|
||||
|
||||
ensure_cache_or_download_optional() {
|
||||
local filename="$1"
|
||||
local upstream_url="$2"
|
||||
|
||||
if ! ensure_cache_or_download "$filename" "$upstream_url"; then
|
||||
echo "[WARN] Optional artifact unavailable: $filename"
|
||||
echo "[WARN] Continuing without optional artifact download."
|
||||
fi
|
||||
}
|
||||
|
||||
version_bump_logic() {
|
||||
echo "--- Starting version bump logic ---"
|
||||
echo "New Version: $NEW_VERSION"
|
||||
echo "Old Version: $OLD_VERSION"
|
||||
|
||||
# 1. Fetch latest Node.js 24.x version
|
||||
echo "[DEBUG] Fetching Node.js v24.x directory listing..."
|
||||
# 1. Fetch latest Node.js 24.x (shared by amd64+arm64)
|
||||
echo "[DEBUG] Fetching latest Node.js 24.x with amd64+arm64 availability..."
|
||||
NODE_HTML=$(curl -fsSL https://nodejs.org/dist/latest-v24.x/)
|
||||
FIRST_MATCH=$(echo "$NODE_HTML" | grep -oE 'node-v24\.[0-9]+\.[0-9]+-linux-x64\.tar\.gz' | head -1)
|
||||
NEW_NODE=$(echo "$FIRST_MATCH" | sed -E 's/node-v([0-9]+\.[0-9]+\.[0-9]+)-linux-x64\.tar\.gz/\1/')
|
||||
FIRST_MATCH=$(echo "$NODE_HTML" | grep -oE 'node-v24\.[0-9]+\.[0-9]+-linux-x64\.tar\.xz' | head -1)
|
||||
NEW_NODE=$(echo "$FIRST_MATCH" | sed -E 's/node-v([0-9]+\.[0-9]+\.[0-9]+)-linux-x64\.tar\.xz/\1/')
|
||||
|
||||
if [[ -z "$NEW_NODE" ]]; then
|
||||
echo "Error: Could not determine latest Node.js version." >&2
|
||||
echo "Error: Could not determine latest Node.js 24.x version." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! http_ok "https://nodejs.org/dist/v${NEW_NODE}/node-v${NEW_NODE}-linux-arm64.tar.xz"; then
|
||||
echo "Error: Node.js v${NEW_NODE} does not have linux-arm64 tar.xz." >&2
|
||||
exit 1
|
||||
fi
|
||||
echo "Latest Node.js detected: $NEW_NODE"
|
||||
|
||||
# 2. Detect latest MongoDB 7.x
|
||||
# Locked to Ubuntu 22.04 and using sort -V to ensure 7.0.31 > 7.0.9
|
||||
echo "[DEBUG] Detecting latest MongoDB 7.x version for Ubuntu 22.04..."
|
||||
MONGO_LINE=$(curl -fsSL https://www.mongodb.com/try/download/community | grep -o 'mongodb-linux-x86_64-ubuntu2204-7\.[0-9]\+\.[0-9]\+\.tgz' | sort -V | tail -1)
|
||||
# 2. Detect latest MongoDB 7.x available for both amd64 and arm64
|
||||
echo "[DEBUG] Detecting latest MongoDB 7.x for ubuntu2204 on amd64+arm64..."
|
||||
MONGO_VER=$(latest_common_version \
|
||||
"https://fastdl.mongodb.org/linux/" \
|
||||
'mongodb-linux-x86_64-ubuntu2204-7\.[0-9]+\.[0-9]+\.tgz' \
|
||||
's/mongodb-linux-x86_64-ubuntu2204-([0-9]+\.[0-9]+\.[0-9]+)\.tgz/\1/' \
|
||||
'https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2204-%s.tgz' \
|
||||
'https://fastdl.mongodb.org/linux/mongodb-linux-aarch64-ubuntu2204-%s.tgz') || true
|
||||
|
||||
if [ -z "$MONGO_LINE" ]; then
|
||||
echo "Error: Could not determine latest MongoDB 7.x version." >&2
|
||||
exit 1
|
||||
if [ -z "${MONGO_VER:-}" ]; then
|
||||
MONGO_VER=$(get_current_version_from_file snapcraft.yaml 'mongodb-linux-\$\{MONGO_ARCH\}-ubuntu2204-[0-9]+\.[0-9]+\.[0-9]+' | sed -E 's/.*-ubuntu2204-//')
|
||||
fi
|
||||
|
||||
MONGO_VER=$(echo "$MONGO_LINE" | sed -E 's/.*-7/7/' | sed 's/\.tgz$//')
|
||||
UBUNTU_VER="2204"
|
||||
echo "Detected MongoDB: $MONGO_VER for Ubuntu $UBUNTU_VER"
|
||||
if [ -z "$MONGO_VER" ]; then
|
||||
echo "Error: Could not determine latest/common MongoDB version." >&2
|
||||
exit 1
|
||||
fi
|
||||
echo "Latest common MongoDB detected: $MONGO_VER"
|
||||
|
||||
# 3. Update Configuration Files: MongoDB & Tools
|
||||
echo "[DEBUG] Updating snapcraft.yaml releases/snapcraft-local.yaml and documentation..."
|
||||
sedi "s|mongodb-linux-x86_64-ubuntu[0-9]\+-7\.[0-9][0-9]*\.[0-9][0-9]*|mongodb-linux-x86_64-ubuntu${UBUNTU_VER}-$MONGO_VER|g" snapcraft.yaml releases/snapcraft-local.yaml
|
||||
# 3. Detect latest mongosh available for both amd64 and arm64
|
||||
echo "[DEBUG] Detecting latest mongosh for amd64+arm64..."
|
||||
MONGOSH_VER=$(latest_common_version \
|
||||
"https://downloads.mongodb.com/compass/" \
|
||||
'mongosh-[0-9]+\.[0-9]+\.[0-9]+-linux-x64\.tgz' \
|
||||
's/mongosh-([0-9]+\.[0-9]+\.[0-9]+)-linux-x64\.tgz/\1/' \
|
||||
'https://downloads.mongodb.com/compass/mongosh-%s-linux-x64.tgz' \
|
||||
'https://downloads.mongodb.com/compass/mongosh-%s-linux-arm64.tgz') || true
|
||||
|
||||
# Ensure database tools point to the correct Ubuntu version
|
||||
sedi -E "s|mongodb-database-tools-ubuntu[0-9]+-x86_64|mongodb-database-tools-ubuntu2204-x86_64|g" snapcraft.yaml releases/snapcraft-local.yaml
|
||||
if [ -z "${MONGOSH_VER:-}" ]; then
|
||||
MONGOSH_VER=$(get_current_version_from_file snapcraft.yaml 'mongosh-[0-9]+\.[0-9]+\.[0-9]+-linux-\$\{MONGOSH_ARCH\}\.tgz' | sed -E 's/mongosh-([0-9]+\.[0-9]+\.[0-9]+)-.*/\1/')
|
||||
fi
|
||||
|
||||
# 4. Update Node.js versions
|
||||
sedi "s|NODE_VERSION=v24\.[0-9][0-9]*\.[0-9][0-9]*|NODE_VERSION=v${NEW_NODE}|g" Dockerfile
|
||||
sedi "s|npm-node-version: 24\.[0-9][0-9]*\.[0-9][0-9]*|npm-node-version: ${NEW_NODE}|g" snapcraft.yaml releases/snapcraft-local.yaml
|
||||
sedi "s|NODE_VERSION=\"24\.[0-9][0-9]*\.[0-9][0-9]*\"|NODE_VERSION=\"${NEW_NODE}\"|g" snapcraft.yaml releases/snapcraft-local.yaml
|
||||
sedi "s|Node\.js 24\.[0-9][0-9]*\.[0-9][0-9]* binary|Node.js ${NEW_NODE} binary|g" snapcraft.yaml releases/snapcraft-local.yaml
|
||||
if [ -z "$MONGOSH_VER" ]; then
|
||||
echo "Error: Could not determine latest/common mongosh version." >&2
|
||||
exit 1
|
||||
fi
|
||||
echo "Latest common mongosh detected: $MONGOSH_VER"
|
||||
|
||||
# 5. Update Application Versions
|
||||
# 4. Detect latest mongodb-database-tools available for both amd64 and arm64
|
||||
echo "[DEBUG] Detecting latest mongodb-database-tools for ubuntu2204 on amd64+arm64..."
|
||||
TOOLS_VER=$(latest_common_version \
|
||||
"https://fastdl.mongodb.org/tools/db/" \
|
||||
'mongodb-database-tools-ubuntu2204-x86_64-[0-9]+\.[0-9]+\.[0-9]+\.tgz' \
|
||||
's/mongodb-database-tools-ubuntu2204-x86_64-([0-9]+\.[0-9]+\.[0-9]+)\.tgz/\1/' \
|
||||
'https://fastdl.mongodb.org/tools/db/mongodb-database-tools-ubuntu2204-x86_64-%s.tgz' \
|
||||
'https://fastdl.mongodb.org/tools/db/mongodb-database-tools-ubuntu2204-arm64-%s.tgz') || true
|
||||
|
||||
if [ -z "${TOOLS_VER:-}" ]; then
|
||||
TOOLS_VER=$(get_current_version_from_file snapcraft.yaml 'mongodb-database-tools-ubuntu2204-\$\{TOOLS_ARCH\}-[0-9]+\.[0-9]+\.[0-9]+' | sed -E 's/.*-ubuntu2204-\$\{TOOLS_ARCH\}-//')
|
||||
fi
|
||||
|
||||
if [ -z "$TOOLS_VER" ]; then
|
||||
echo "Error: Could not determine latest/common mongodb-database-tools version." >&2
|
||||
exit 1
|
||||
fi
|
||||
echo "Latest common mongodb-database-tools detected: $TOOLS_VER"
|
||||
|
||||
# 5. Update dependency versions in snap files and Dockerfile
|
||||
echo "[DEBUG] Updating dependency versions in files..."
|
||||
sedi -E "s|NODE_VERSION=v24\.[0-9]+\.[0-9]+|NODE_VERSION=v${NEW_NODE}|g" Dockerfile
|
||||
sedi -E "s|npm-node-version: 24\.[0-9]+\.[0-9]+|npm-node-version: ${NEW_NODE}|g" snapcraft.yaml releases/snapcraft-local.yaml
|
||||
sedi -E "s|NODE_TAR=\"node-v24\.[0-9]+\.[0-9]+-linux-\$\{NODE_ARCH\}\.tar\.xz\"|NODE_TAR=\"node-v${NEW_NODE}-linux-\${NODE_ARCH}.tar.xz\"|g" snapcraft.yaml releases/snapcraft-local.yaml
|
||||
sedi -E "s|node-v24\.[0-9]+\.[0-9]+-linux-\$\{NODE_ARCH\}/bin/node|node-v${NEW_NODE}-linux-\${NODE_ARCH}/bin/node|g" snapcraft.yaml releases/snapcraft-local.yaml
|
||||
|
||||
sedi -E "s|mongodb-linux-\$\{MONGO_ARCH\}-ubuntu2204-7\.[0-9]+\.[0-9]+\.tgz|mongodb-linux-\${MONGO_ARCH}-ubuntu2204-${MONGO_VER}.tgz|g" snapcraft.yaml releases/snapcraft-local.yaml
|
||||
sedi -E "s|mongosh-[0-9]+\.[0-9]+\.[0-9]+-linux-\$\{MONGOSH_ARCH\}\.tgz|mongosh-${MONGOSH_VER}-linux-\${MONGOSH_ARCH}.tgz|g" snapcraft.yaml releases/snapcraft-local.yaml
|
||||
sedi -E "s|mongodb-database-tools-ubuntu2204-\$\{TOOLS_ARCH\}-[0-9]+\.[0-9]+\.[0-9]+\.tgz|mongodb-database-tools-ubuntu2204-\${TOOLS_ARCH}-${TOOLS_VER}.tgz|g" snapcraft.yaml releases/snapcraft-local.yaml
|
||||
|
||||
# 6. Update application versions (existing logic retained)
|
||||
NEW_NO_DOTS=$(echo "$NEW_VERSION" | tr -d '.')
|
||||
OLD_NO_DOTS=$(echo "$OLD_VERSION" | tr -d '.')
|
||||
TODAY=$(date +%Y-%m-%d)
|
||||
|
||||
# Standardize version to vX.Y.Z
|
||||
if [[ $NEW_VERSION =~ ^[0-9]+\.[0-9]+$ ]]; then PKG_VER="v${NEW_VERSION}.0"; else PKG_VER="v${NEW_VERSION}"; fi
|
||||
if [[ $NEW_VERSION =~ ^[0-9]+\.[0-9]+$ ]]; then
|
||||
PKG_VER="v${NEW_VERSION}.0"
|
||||
else
|
||||
PKG_VER="v${NEW_VERSION}"
|
||||
fi
|
||||
|
||||
sedi "0,/\"version\": \"[^\"]*\"/s//\"version\": \"${PKG_VER}\"/" package.json
|
||||
sedi "0,/\"version\": \"[^\"]*\"/s//\"version\": \"${PKG_VER}\"/" package-lock.json
|
||||
@@ -76,44 +218,66 @@ version_bump_logic() {
|
||||
sedi "s|v$OLD_VERSION/|v$NEW_VERSION/|g" snapcraft.yaml releases/snapcraft-local.yaml
|
||||
sedi "s|wekan-$OLD_VERSION-|wekan-$NEW_VERSION-|g" snapcraft.yaml releases/snapcraft-local.yaml
|
||||
|
||||
# Sandstorm Specifics
|
||||
sedi "0,/appVersion = [0-9]\+/s/appVersion = [0-9]\+/appVersion = ${NEW_NO_DOTS}/" sandstorm-pkgdef.capnp
|
||||
sedi "0,/appMarketingVersion = (defaultText = \"[^\"]*\")/s/appMarketingVersion = (defaultText = \"[^\"]*\")/appMarketingVersion = (defaultText = \"${NEW_VERSION}~${TODAY}\")/" sandstorm-pkgdef.capnp
|
||||
sedi "s|appVersion = $OLD_NO_DOTS,|appVersion = $NEW_NO_DOTS,|g" sandstorm-pkgdef.capnp
|
||||
|
||||
# Docker and Documentation
|
||||
sedi "s|ARG VERSION=$OLD_VERSION|ARG VERSION=$NEW_VERSION|g" Dockerfile
|
||||
sedi "s|wekan-$OLD_VERSION|wekan-$NEW_VERSION|g" docs/Platforms/Propietary/Windows/Offline.md
|
||||
sedi "s|/v$OLD_VERSION/|/v$NEW_VERSION/|g" docs/Platforms/Propietary/Windows/Offline.md
|
||||
|
||||
# 6. Update Wekan website (if applicable)
|
||||
# 7. Ensure local cache artifacts are available (or downloaded to ~/Lataukset)
|
||||
echo "[DEBUG] Checking local cache and downloading missing artifacts to $DOWNLOAD_DIR ..."
|
||||
# These release bundles usually do not exist yet when preparing a new release.
|
||||
# Keep this optional so version bump does not fail before build/publish steps.
|
||||
ensure_cache_or_download_optional "wekan-${NEW_VERSION}-amd64.zip" "https://github.com/wekan/wekan/releases/download/v${NEW_VERSION}/wekan-${NEW_VERSION}-amd64.zip"
|
||||
ensure_cache_or_download_optional "wekan-${NEW_VERSION}-arm64.zip" "https://github.com/wekan/wekan/releases/download/v${NEW_VERSION}/wekan-${NEW_VERSION}-arm64.zip"
|
||||
|
||||
ensure_cache_or_download "node-v${NEW_NODE}-linux-x64.tar.xz" "https://nodejs.org/dist/v${NEW_NODE}/node-v${NEW_NODE}-linux-x64.tar.xz"
|
||||
ensure_cache_or_download "node-v${NEW_NODE}-linux-arm64.tar.xz" "https://nodejs.org/dist/v${NEW_NODE}/node-v${NEW_NODE}-linux-arm64.tar.xz"
|
||||
|
||||
ensure_cache_or_download "mongodb-linux-x86_64-ubuntu2204-${MONGO_VER}.tgz" "https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2204-${MONGO_VER}.tgz"
|
||||
ensure_cache_or_download "mongodb-linux-aarch64-ubuntu2204-${MONGO_VER}.tgz" "https://fastdl.mongodb.org/linux/mongodb-linux-aarch64-ubuntu2204-${MONGO_VER}.tgz"
|
||||
|
||||
ensure_cache_or_download "mongosh-${MONGOSH_VER}-linux-x64.tgz" "https://downloads.mongodb.com/compass/mongosh-${MONGOSH_VER}-linux-x64.tgz"
|
||||
ensure_cache_or_download "mongosh-${MONGOSH_VER}-linux-arm64.tgz" "https://downloads.mongodb.com/compass/mongosh-${MONGOSH_VER}-linux-arm64.tgz"
|
||||
|
||||
ensure_cache_or_download "mongodb-database-tools-ubuntu2204-x86_64-${TOOLS_VER}.tgz" "https://fastdl.mongodb.org/tools/db/mongodb-database-tools-ubuntu2204-x86_64-${TOOLS_VER}.tgz"
|
||||
ensure_cache_or_download "mongodb-database-tools-ubuntu2204-arm64-${TOOLS_VER}.tgz" "https://fastdl.mongodb.org/tools/db/mongodb-database-tools-ubuntu2204-arm64-${TOOLS_VER}.tgz"
|
||||
|
||||
# 8. Update Wekan website (if applicable)
|
||||
if [ -d "../w/wekan.fi" ]; then
|
||||
INSTALL_PAGE="../w/wekan.fi/install/index.html"
|
||||
METEOR_VER=$(grep -o 'METEOR@[^ "\\]*' .meteor/release | head -1 | sed 's/.*@//')
|
||||
NPM_VER=$(grep -o 'NPM_VERSION=[^ "\\]*' Dockerfile | head -1 | cut -d= -f2 | tr -d '"')
|
||||
|
||||
(cd ../w/wekan.fi && git pull)
|
||||
#sedi "s|MongoDB 7\\.x|MongoDB $MONGO_VER|g" "$INSTALL_PAGE"
|
||||
sedi "s|<span id=\"meteor-version\">[^<]*</span>|<span id=\"meteor-version\">$METEOR_VER</span>|g" "$INSTALL_PAGE"
|
||||
#sedi "s|<span id=\"node-version\">[^<]*</span>|<span id=\"node-version\">v$NEW_NODE</span>|g" "$INSTALL_PAGE"
|
||||
#sedi "s|<span id=\"npm-version\">[^<]*</span>|<span id=\"npm-version\">$NPM_VER</span>|g" "$INSTALL_PAGE"
|
||||
sedi "s|<span class=\"version-number\">v${OLD_VERSION}</span>|<span class=\"version-number\">v${NEW_VERSION}</span>|g" "$INSTALL_PAGE"
|
||||
(cd ../w/wekan.fi && git add --all && git commit -m "Updates" && git push)
|
||||
|
||||
# Keep variable referenced to avoid shellcheck complaints in local runs.
|
||||
: "$NPM_VER"
|
||||
fi
|
||||
|
||||
echo "--- Version bump complete ---"
|
||||
echo "Detected dependency versions:"
|
||||
echo " Node.js: $NEW_NODE"
|
||||
echo " MongoDB (ubuntu2204): $MONGO_VER"
|
||||
echo " mongosh: $MONGOSH_VER"
|
||||
echo " mongodb-database-tools: $TOOLS_VER"
|
||||
}
|
||||
|
||||
# --- MAIN BLOCK ---
|
||||
|
||||
# If manual arguments are missing, parse CHANGELOG.md
|
||||
if [ -z "$1" ] || [ -z "$2" ]; then
|
||||
if [ -z "${1:-}" ] || [ -z "${2:-}" ]; then
|
||||
echo "No arguments. Detecting versions from CHANGELOG.md..."
|
||||
mapfile -t RELEASE_LINES < <(grep -E '^# v[0-9]+\.[0-9]+(\.[0-9]+)?[ -]+[0-9]{4}-[0-9]{2}-[0-9]{2}' CHANGELOG.md | head -2)
|
||||
NEW_VERSION=$(echo "${RELEASE_LINES[0]}" | grep -oE 'v[0-9]+\.[0-9]+(\.[0-9]+)?' | head -1 | sed 's/^v//')
|
||||
OLD_VERSION=$(echo "${RELEASE_LINES[1]}" | grep -oE 'v[0-9]+\.[0-9]+(\.[0-9]+)?' | head -1 | sed 's/^v//')
|
||||
if [ -z "$NEW_VERSION" ] || [ -z "$OLD_VERSION" ]; then
|
||||
echo "Error: Automatics detection failed." >&2
|
||||
NEW_VERSION=$(echo "${RELEASE_LINES[0]:-}" | grep -oE 'v[0-9]+\.[0-9]+(\.[0-9]+)?' | head -1 | sed 's/^v//')
|
||||
OLD_VERSION=$(echo "${RELEASE_LINES[1]:-}" | grep -oE 'v[0-9]+\.[0-9]+(\.[0-9]+)?' | head -1 | sed 's/^v//')
|
||||
if [ -z "${NEW_VERSION:-}" ] || [ -z "${OLD_VERSION:-}" ]; then
|
||||
echo "Error: Automatic detection failed." >&2
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
|
||||
@@ -22,10 +22,10 @@ const pkgdef :Spk.PackageDefinition = (
|
||||
appTitle = (defaultText = "Wekan"),
|
||||
# The name of the app as it is displayed to the user.
|
||||
|
||||
appVersion = 923,
|
||||
appVersion = 926,
|
||||
# Increment this for every release.
|
||||
|
||||
appMarketingVersion = (defaultText = "9.23~2026-05-21"),
|
||||
appMarketingVersion = (defaultText = "9.26~2026-05-22"),
|
||||
# Human-readable presentation of the app version.
|
||||
|
||||
minUpgradableAppVersion = 0,
|
||||
|
||||
@@ -19,7 +19,7 @@ export LC_ALL=C
|
||||
# and at directory /snap/${SNAP_NAME}/current/migratemongo/avx
|
||||
# is bash scripts like mongod, mongosh check avx support and use Qemu if needed.
|
||||
export PATH=$SNAP/migratemongo/avx:$SNAP/usr/bin:$SNAP/bin:$PATH
|
||||
export LD_LIBRARY_PATH=$SNAP/lib:$SNAP/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH
|
||||
export LD_LIBRARY_PATH=$SNAP/lib:$SNAP/lib/x86_64-linux-gnu:$SNAP/lib/aarch64-linux-gnu:$LD_LIBRARY_PATH
|
||||
|
||||
if [ -z $1 ]; then
|
||||
DATE=`/bin/date +%Y%m%dT%H%M%S`
|
||||
|
||||
@@ -39,7 +39,7 @@ export LC_ALL=C
|
||||
# migratemongo/avx wrapper scripts transparently re-run MongoDB commands via QEMU.
|
||||
# See https://github.com/wekan/migratemongo
|
||||
export PATH=$SNAP/migratemongo/avx:$SNAP/usr/bin:$SNAP/bin:${PATH}
|
||||
export LD_LIBRARY_PATH=$SNAP/lib:$SNAP/lib/x86_64-linux-gnu:${LD_LIBRARY_PATH}
|
||||
export LD_LIBRARY_PATH=$SNAP/lib:$SNAP/lib/x86_64-linux-gnu:$SNAP/lib/aarch64-linux-gnu:${LD_LIBRARY_PATH}
|
||||
|
||||
# If temporary settings log exists, delete it
|
||||
if [ -f ${SNAP_COMMON}/settings.log ]; then
|
||||
@@ -147,7 +147,7 @@ echo "Replica set member host: ${RS_MEMBER_HOST}"
|
||||
# Always start MongoDB temporarily in background to verify/fix replica set
|
||||
# config before the final foreground start. This catches first-run,
|
||||
# port changes, and corrupt/missing replica set state.
|
||||
# Use --pidFilePath so we can kill exactly this process without touching
|
||||
# Use --pidfilepath so we can kill exactly this process without touching
|
||||
# MongoDB instances from other parallel snap installs.
|
||||
TEMP_PID_FILE="${SNAP_COMMON}/mongod-temp.pid"
|
||||
echo "Starting MongoDB temporarily to check replica set configuration..."
|
||||
@@ -160,7 +160,7 @@ $SNAP/bin/mongod \
|
||||
--setParameter logicalSessionRefreshMillis=900000 \
|
||||
--setParameter localLogicalSessionTimeoutMinutes=45 \
|
||||
--replSet rs0 --oplogSize 20480 --fork \
|
||||
--pidFilePath="$TEMP_PID_FILE"
|
||||
--pidfilepath="$TEMP_PID_FILE"
|
||||
|
||||
# Wait for MongoDB to accept connections (up to 30 s)
|
||||
echo "Waiting for MongoDB to accept connections on port ${_RS_PORT}..."
|
||||
|
||||
@@ -18,7 +18,7 @@ export LC_ALL=C
|
||||
# and at directory /snap/${SNAP_NAME}/current/migratemongo/avx
|
||||
# is bash scripts like mongod, mongosh check avx support and use Qemu if needed.
|
||||
export PATH=$SNAP/migratemongo/avx:$SNAP/usr/bin:$SNAP/bin:$PATH
|
||||
export LD_LIBRARY_PATH=$SNAP/lib:$SNAP/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH
|
||||
export LD_LIBRARY_PATH=$SNAP/lib:$SNAP/lib/x86_64-linux-gnu:$SNAP/lib/aarch64-linux-gnu:$LD_LIBRARY_PATH
|
||||
|
||||
# start mongodb restore
|
||||
[ "x" == "x${MONGODB_BIND_IP}" ] && MONGODB_BIND_IP="127.0.0.1"
|
||||
|
||||
+76
-18
@@ -1,6 +1,6 @@
|
||||
name: wekan
|
||||
version: '9.23'
|
||||
base: core24
|
||||
version: '9.26'
|
||||
base: core26
|
||||
summary: Open Source kanban
|
||||
description: |
|
||||
WeKan ® is an Open Source and collaborative kanban board application.
|
||||
@@ -27,11 +27,14 @@ environment:
|
||||
SNAP_COMMON: "/var/snap/$SNAP_INSTANCE_NAME/common"
|
||||
SNAP: "/snap/$SNAP_INSTANCE_NAME/$SNAP_REVISION"
|
||||
|
||||
# Use platforms instead of architectures for core24 base
|
||||
# Use platforms instead of architectures for core26 base
|
||||
platforms:
|
||||
amd64:
|
||||
build-on: amd64
|
||||
build-for: amd64
|
||||
arm64:
|
||||
build-on: arm64
|
||||
build-for: arm64
|
||||
|
||||
plugs:
|
||||
mongodb-plug:
|
||||
@@ -85,8 +88,8 @@ apps:
|
||||
|
||||
parts:
|
||||
mongodb:
|
||||
source: https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2204-7.0.34.tgz
|
||||
plugin: dump
|
||||
plugin: nil
|
||||
#source: https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2204-7.0.34.tgz
|
||||
stage-packages:
|
||||
- libssl3
|
||||
- libcurl4
|
||||
@@ -101,6 +104,18 @@ parts:
|
||||
- libboost-filesystem1.74.0
|
||||
- libboost-program-options1.74.0
|
||||
- libgoogle-perftools4
|
||||
override-build: |
|
||||
set -eu
|
||||
case "${CRAFT_ARCH_BUILD_FOR}" in
|
||||
amd64) MONGO_ARCH="x86_64" ;;
|
||||
arm64) MONGO_ARCH="aarch64" ;;
|
||||
*) echo "Unsupported architecture: ${CRAFT_ARCH_BUILD_FOR}"; exit 1 ;;
|
||||
esac
|
||||
MONGO_URL="https://fastdl.mongodb.org/linux/mongodb-linux-${MONGO_ARCH}-ubuntu2204-7.0.34.tgz"
|
||||
wget -O mongodb.tgz "$MONGO_URL"
|
||||
tar -xzf mongodb.tgz --strip-components=1
|
||||
mkdir -p "$SNAPCRAFT_PART_INSTALL/bin"
|
||||
cp -a bin/* "$SNAPCRAFT_PART_INSTALL/bin/"
|
||||
stage:
|
||||
- bin
|
||||
- usr
|
||||
@@ -109,18 +124,42 @@ parts:
|
||||
- usr
|
||||
|
||||
mongosh:
|
||||
source: https://downloads.mongodb.com/compass/mongosh-2.8.2-linux-x64.tgz
|
||||
plugin: dump
|
||||
plugin: nil
|
||||
#source: https://downloads.mongodb.com/compass/mongosh-2.8.2-linux-x64.tgz
|
||||
override-build: |
|
||||
set -eu
|
||||
case "${CRAFT_ARCH_BUILD_FOR}" in
|
||||
amd64) MONGOSH_ARCH="x64" ;;
|
||||
arm64) MONGOSH_ARCH="arm64" ;;
|
||||
*) echo "Unsupported architecture: ${CRAFT_ARCH_BUILD_FOR}"; exit 1 ;;
|
||||
esac
|
||||
MONGOSH_URL="https://downloads.mongodb.com/compass/mongosh-2.8.2-linux-${MONGOSH_ARCH}.tgz"
|
||||
wget -O mongosh.tgz "$MONGOSH_URL"
|
||||
tar -xzf mongosh.tgz --strip-components=1
|
||||
mkdir -p "$SNAPCRAFT_PART_INSTALL/bin"
|
||||
cp -a bin/* "$SNAPCRAFT_PART_INSTALL/bin/"
|
||||
|
||||
mongotools:
|
||||
source: https://fastdl.mongodb.org/tools/db/mongodb-database-tools-ubuntu2204-x86_64-100.16.0.tgz
|
||||
plugin: dump
|
||||
plugin: nil
|
||||
#source: https://fastdl.mongodb.org/tools/db/mongodb-database-tools-ubuntu2204-x86_64-100.16.0.tgz
|
||||
override-build: |
|
||||
set -eu
|
||||
case "${CRAFT_ARCH_BUILD_FOR}" in
|
||||
amd64) TOOLS_ARCH="x86_64" ;;
|
||||
arm64) TOOLS_ARCH="arm64" ;;
|
||||
*) echo "Unsupported architecture: ${CRAFT_ARCH_BUILD_FOR}"; exit 1 ;;
|
||||
esac
|
||||
TOOLS_URL="https://fastdl.mongodb.org/tools/db/mongodb-database-tools-ubuntu2204-${TOOLS_ARCH}-100.16.0.tgz"
|
||||
wget -O mongotools.tgz "$TOOLS_URL"
|
||||
tar -xzf mongotools.tgz --strip-components=1
|
||||
mkdir -p "$SNAPCRAFT_PART_INSTALL/bin"
|
||||
cp -a bin/* "$SNAPCRAFT_PART_INSTALL/bin/"
|
||||
|
||||
|
||||
wekan:
|
||||
source: .
|
||||
plugin: npm
|
||||
npm-node-version: 24.15.0
|
||||
npm-node-version: 24.16.0
|
||||
npm-include-node: true
|
||||
build-packages:
|
||||
- build-essential
|
||||
@@ -138,13 +177,31 @@ parts:
|
||||
stage-packages:
|
||||
- libfontconfig1
|
||||
override-build: |
|
||||
set -eu
|
||||
case "${CRAFT_ARCH_BUILD_FOR}" in
|
||||
amd64)
|
||||
WEKAN_ARCH="amd64"
|
||||
NODE_ARCH="x64"
|
||||
;;
|
||||
arm64)
|
||||
WEKAN_ARCH="arm64"
|
||||
NODE_ARCH="arm64"
|
||||
;;
|
||||
*)
|
||||
echo "Unsupported architecture: ${CRAFT_ARCH_BUILD_FOR}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
WEKAN_ZIP="wekan-9.26-${WEKAN_ARCH}.zip"
|
||||
NODE_TAR="node-v24.15.0-linux-${NODE_ARCH}.tar.xz"
|
||||
echo "Cleaning environment first"
|
||||
rm -rf .build
|
||||
mkdir .build
|
||||
cd .build
|
||||
wget https://github.com/wekan/wekan/releases/download/v9.23/wekan-9.23-amd64.zip
|
||||
unzip wekan-9.23-amd64.zip
|
||||
rm wekan-9.23-amd64.zip
|
||||
#wget https://github.com/wekan/wekan/releases/download/v9.26/wekan-9.26-amd64.zip
|
||||
wget "https://github.com/wekan/wekan/releases/download/v9.26/${WEKAN_ZIP}"
|
||||
unzip "${WEKAN_ZIP}"
|
||||
rm "${WEKAN_ZIP}"
|
||||
# Fix: bcrypt 5.0.1 (Meteor accounts-password) ships node-addon-api@3
|
||||
# which fails to compile on Node.js 24. Replace with bcrypt 6.0.0.
|
||||
BCRYPT_DIR="bundle/programs/server/npm/node_modules/meteor/accounts-password/node_modules/bcrypt"
|
||||
@@ -164,12 +221,13 @@ parts:
|
||||
npm install
|
||||
cd ../../../..
|
||||
# Copy to Snap
|
||||
wget https://nodejs.org/dist/latest-v24.x/node-v24.15.0-linux-x64.tar.xz
|
||||
tar -xf node-v24.15.0-linux-x64.tar.xz node-v24.15.0-linux-x64/bin/node
|
||||
rm node-v24.15.0-linux-x64.tar.xz
|
||||
#wget https://nodejs.org/dist/latest-v24.x/node-v24.15.0-linux-x64.tar.xz
|
||||
wget "https://nodejs.org/dist/latest-v24.x/${NODE_TAR}"
|
||||
tar -xf "${NODE_TAR}" "node-v24.15.0-linux-${NODE_ARCH}/bin/node"
|
||||
rm "${NODE_TAR}"
|
||||
mkdir $SNAPCRAFT_PART_INSTALL/bin
|
||||
cp -p node-v24.15.0-linux-x64/bin/node $SNAPCRAFT_PART_INSTALL/bin/
|
||||
rm -rf node-v24.15.0-linux-x64
|
||||
cp -p "node-v24.15.0-linux-${NODE_ARCH}/bin/node" $SNAPCRAFT_PART_INSTALL/bin/
|
||||
rm -rf "node-v24.15.0-linux-${NODE_ARCH}"
|
||||
cp -r .build/bundle/* $SNAPCRAFT_PART_INSTALL/
|
||||
cp .build/bundle/.node_version.txt $SNAPCRAFT_PART_INSTALL/
|
||||
rm -f $SNAPCRAFT_PART_INSTALL/lib/node_modules/wekan
|
||||
|
||||
Reference in new issue
Block a user