mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-09-27 06:37:16 +02:00
Take the Obsidian version from the Ignis release tag (#17503)
Upstream renamed OBSIDIAN_VERSION in its Dockerfile to IGNIS_OBSIDIAN_PIN, so the grep matched nothing - and under pipefail the assignment itself aborts, which is why the fallback on the next line never ran. The tag already carries the pairing (0.8.13+obsidian.1.13.7), so read it there and keep both Dockerfile keys as a fallback.
This commit is contained in:
committed by
GitHub
parent
28aa1bdbee
commit
89671ce007
+8
-3
@@ -49,9 +49,14 @@ function update_script() {
|
||||
msg_ok "Built Ignis"
|
||||
|
||||
msg_info "Checking Obsidian Web Assets"
|
||||
OBSIDIAN_VERSION=$(grep -oP 'OBSIDIAN_VERSION=\K[0-9.]+' /opt/ignis/apps/ignis-server/Dockerfile | head -n1)
|
||||
[[ -z "$OBSIDIAN_VERSION" ]] && OBSIDIAN_VERSION="$(cat /opt/ignis_data/obsidian.version 2>/dev/null)"
|
||||
if [[ -n "$OBSIDIAN_VERSION" && "$OBSIDIAN_VERSION" != "$(cat /opt/ignis_data/obsidian.version 2>/dev/null)" ]]; then
|
||||
# From the release tag (0.8.13+obsidian.1.13.7): upstream renamed the Dockerfile variable.
|
||||
OBSIDIAN_VERSION=""
|
||||
[[ "${IGNIS_BUILD:-}" == *obsidian.* ]] && OBSIDIAN_VERSION="${IGNIS_BUILD##*obsidian.}"
|
||||
if [[ ! "$OBSIDIAN_VERSION" =~ ^[0-9]+(\.[0-9]+)+$ ]]; then
|
||||
OBSIDIAN_VERSION="$(grep -ohP '(OBSIDIAN_VERSION|IGNIS_OBSIDIAN_PIN)=\K[0-9.]+' /opt/ignis/apps/ignis-server/Dockerfile 2>/dev/null | head -n1 || true)"
|
||||
fi
|
||||
[[ "$OBSIDIAN_VERSION" =~ ^[0-9]+(\.[0-9]+)+$ ]] || msg_warn "Could not determine the paired Obsidian version - keeping the installed assets"
|
||||
if [[ "$OBSIDIAN_VERSION" =~ ^[0-9]+(\.[0-9]+)+$ && "$OBSIDIAN_VERSION" != "$(cat /opt/ignis_data/obsidian.version 2>/dev/null)" ]]; then
|
||||
rm -rf /opt/ignis_data/obsidian-app
|
||||
mkdir -p /opt/ignis_data/obsidian-app
|
||||
curl -fsSL -o /tmp/obsidian.asar.gz "https://github.com/obsidianmd/obsidian-releases/releases/download/v${OBSIDIAN_VERSION}/obsidian-${OBSIDIAN_VERSION}.asar.gz"
|
||||
|
||||
@@ -32,8 +32,16 @@ msg_ok "Built Ignis"
|
||||
|
||||
msg_info "Downloading Obsidian Web Assets"
|
||||
mkdir -p /opt/ignis_data/{obsidian-app,vaults,data}
|
||||
OBSIDIAN_VERSION=$(grep -oP 'OBSIDIAN_VERSION=\K[0-9.]+' /opt/ignis/apps/ignis-server/Dockerfile | head -n1)
|
||||
[[ -z "$OBSIDIAN_VERSION" ]] && OBSIDIAN_VERSION="1.12.7"
|
||||
# From the release tag (0.8.13+obsidian.1.13.7): upstream renamed the Dockerfile variable.
|
||||
OBSIDIAN_VERSION=""
|
||||
[[ "${IGNIS_BUILD:-}" == *obsidian.* ]] && OBSIDIAN_VERSION="${IGNIS_BUILD##*obsidian.}"
|
||||
if [[ ! "$OBSIDIAN_VERSION" =~ ^[0-9]+(\.[0-9]+)+$ ]]; then
|
||||
OBSIDIAN_VERSION="$(grep -ohP '(OBSIDIAN_VERSION|IGNIS_OBSIDIAN_PIN)=\K[0-9.]+' /opt/ignis/apps/ignis-server/Dockerfile 2>/dev/null | head -n1 || true)"
|
||||
fi
|
||||
if [[ ! "$OBSIDIAN_VERSION" =~ ^[0-9]+(\.[0-9]+)+$ ]]; then
|
||||
msg_error "Could not determine which Obsidian version this Ignis build pairs with"
|
||||
exit 1
|
||||
fi
|
||||
curl -fsSL -o /tmp/obsidian.asar.gz "https://github.com/obsidianmd/obsidian-releases/releases/download/v${OBSIDIAN_VERSION}/obsidian-${OBSIDIAN_VERSION}.asar.gz"
|
||||
gunzip -f /tmp/obsidian.asar.gz
|
||||
$STD asar extract /tmp/obsidian.asar /opt/ignis_data/obsidian-app
|
||||
|
||||
Reference in New Issue
Block a user