mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-02-08 06:13:25 +01:00
Compare commits
5 Commits
fetch-depl
...
add-script
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
440b1602fc | ||
|
|
4e262ff5d8 | ||
|
|
abf2276ce0 | ||
|
|
317db4ef1e | ||
|
|
5f4cdcfbdb |
32
CHANGELOG.md
32
CHANGELOG.md
@@ -398,58 +398,28 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
||||
|
||||
</details>
|
||||
|
||||
## 2026-02-07
|
||||
|
||||
## 2026-02-06
|
||||
|
||||
### 🆕 New Scripts
|
||||
|
||||
- Nightscout ([#11621](https://github.com/community-scripts/ProxmoxVE/pull/11621))
|
||||
- PVE LXC Apps Updater [@MickLesk](https://github.com/MickLesk) ([#11533](https://github.com/community-scripts/ProxmoxVE/pull/11533))
|
||||
- PVE LXC Apps Updater [@MickLesk](https://github.com/MickLesk) ([#11533](https://github.com/community-scripts/ProxmoxVE/pull/11533))
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- Immich: supress startup messages for immich-admin [@vhsdream](https://github.com/vhsdream) ([#11635](https://github.com/community-scripts/ProxmoxVE/pull/11635))
|
||||
- Semaphore: Change Ubuntu release from 'jammy' to 'noble' [@MickLesk](https://github.com/MickLesk) ([#11625](https://github.com/community-scripts/ProxmoxVE/pull/11625))
|
||||
- Pangolin: replace build:sqlite with db:generate + build [@MickLesk](https://github.com/MickLesk) ([#11616](https://github.com/community-scripts/ProxmoxVE/pull/11616))
|
||||
- [FIX] OpenCloud: path issues [@vhsdream](https://github.com/vhsdream) ([#11593](https://github.com/community-scripts/ProxmoxVE/pull/11593))
|
||||
- [FIX] Homepage: preserve public/images & public/icons if they exist [@vhsdream](https://github.com/vhsdream) ([#11594](https://github.com/community-scripts/ProxmoxVE/pull/11594))
|
||||
|
||||
- #### ✨ New Features
|
||||
|
||||
- Shelfmark: remove Chromedriver dep, add URL_BASE env [@vhsdream](https://github.com/vhsdream) ([#11619](https://github.com/community-scripts/ProxmoxVE/pull/11619))
|
||||
- Immich: pin to v2.5.5 [@vhsdream](https://github.com/vhsdream) ([#11598](https://github.com/community-scripts/ProxmoxVE/pull/11598))
|
||||
|
||||
- #### 🔧 Refactor
|
||||
|
||||
- refactor: homepage [@CrazyWolf13](https://github.com/CrazyWolf13) ([#11605](https://github.com/community-scripts/ProxmoxVE/pull/11605))
|
||||
|
||||
### 💾 Core
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- fix(core): spinner misalignment [@ls-root](https://github.com/ls-root) ([#11627](https://github.com/community-scripts/ProxmoxVE/pull/11627))
|
||||
|
||||
- #### 🔧 Refactor
|
||||
|
||||
- [Fix] build.func: QOL grammar adjustment for Creating LXC message [@vhsdream](https://github.com/vhsdream) ([#11633](https://github.com/community-scripts/ProxmoxVE/pull/11633))
|
||||
|
||||
### 📚 Documentation
|
||||
|
||||
- [gh] Update to the New Script request template [@tremor021](https://github.com/tremor021) ([#11612](https://github.com/community-scripts/ProxmoxVE/pull/11612))
|
||||
|
||||
### 🌐 Website
|
||||
|
||||
- #### 📝 Script Information
|
||||
|
||||
- Update LXC App Updater JSON to reflect tag override option [@vhsdream](https://github.com/vhsdream) ([#11626](https://github.com/community-scripts/ProxmoxVE/pull/11626))
|
||||
|
||||
### ❔ Uncategorized
|
||||
|
||||
- Opencloud: fix JSON [@vhsdream](https://github.com/vhsdream) ([#11617](https://github.com/community-scripts/ProxmoxVE/pull/11617))
|
||||
|
||||
## 2026-02-05
|
||||
|
||||
### 🆕 New Scripts
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
_ ___ __ __ __
|
||||
/ | / (_)___ _/ /_ / /_______________ __ __/ /_
|
||||
/ |/ / / __ `/ __ \/ __/ ___/ ___/ __ \/ / / / __/
|
||||
/ /| / / /_/ / / / / /_(__ ) /__/ /_/ / /_/ / /_
|
||||
/_/ |_/_/\__, /_/ /_/\__/____/\___/\____/\__,_/\__/
|
||||
/____/
|
||||
11
ct/immich.sh
11
ct/immich.sh
@@ -105,8 +105,8 @@ EOF
|
||||
msg_ok "Image-processing libraries up to date"
|
||||
fi
|
||||
|
||||
RELEASE="2.5.5"
|
||||
if check_for_gh_release "Immich" "immich-app/immich" "${RELEASE}"; then
|
||||
RELEASE="2.5.3"
|
||||
if check_for_gh_release "immich" "immich-app/immich" "${RELEASE}"; then
|
||||
if [[ $(cat ~/.immich) > "2.5.1" ]]; then
|
||||
msg_info "Enabling Maintenance Mode"
|
||||
cd /opt/immich/app/bin
|
||||
@@ -140,7 +140,7 @@ EOF
|
||||
GEO_DIR="${INSTALL_DIR}/geodata"
|
||||
|
||||
[[ -f "$ML_DIR"/ml_start.sh ]] && cp "$ML_DIR"/ml_start.sh "$INSTALL_DIR"
|
||||
if grep -qs "set -a" "$APP_DIR"/bin/start.sh && grep -qs "warnings" "$APP_DIR"/bin/start.sh; then
|
||||
if grep -qs "set -a" "$APP_DIR"/bin/start.sh; then
|
||||
cp "$APP_DIR"/bin/start.sh "$INSTALL_DIR"
|
||||
else
|
||||
cat <<EOF >"$INSTALL_DIR"/start.sh
|
||||
@@ -150,7 +150,7 @@ set -a
|
||||
. ${INSTALL_DIR}/.env
|
||||
set +a
|
||||
|
||||
/usr/bin/node --no-warnings ${APP_DIR}/dist/main.js "\$@"
|
||||
/usr/bin/node ${APP_DIR}/dist/main.js "\$@"
|
||||
EOF
|
||||
chmod +x "$INSTALL_DIR"/start.sh
|
||||
fi
|
||||
@@ -161,7 +161,7 @@ EOF
|
||||
)
|
||||
|
||||
setup_uv
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "Immich" "immich-app/immich" "tarball" "v${RELEASE}" "$SRC_DIR"
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "immich" "immich-app/immich" "tarball" "v${RELEASE}" "$SRC_DIR"
|
||||
PNPM_VERSION="$(jq -r '.packageManager | split("@")[1]' ${SRC_DIR}/package.json)"
|
||||
NODE_VERSION="24" NODE_MODULE="pnpm@${PNPM_VERSION}" setup_nodejs
|
||||
|
||||
@@ -248,7 +248,6 @@ EOF
|
||||
msg_ok "Disabled Maintenance Mode"
|
||||
fi
|
||||
systemctl restart immich-ml immich-web
|
||||
[[ -f /etc/systemd/system/immich-proxy.service ]] && systemctl restart immich-proxy
|
||||
msg_ok "Updated successfully!"
|
||||
fi
|
||||
exit
|
||||
|
||||
@@ -42,19 +42,16 @@ function update_script() {
|
||||
msg_info "Stopping FlareSolverr service"
|
||||
systemctl stop flaresolverr
|
||||
msg_ok "Stopped FlareSolverr service"
|
||||
|
||||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "flaresolverr" "FlareSolverr/FlareSolverr" "prebuild" "latest" "/opt/flaresolverr" "flaresolverr_linux_x64.tar.gz"
|
||||
|
||||
|
||||
msg_info "Starting FlareSolverr Service"
|
||||
systemctl start flaresolverr
|
||||
msg_ok "Started FlareSolverr Service"
|
||||
msg_ok "Updated FlareSolverr"
|
||||
fi
|
||||
|
||||
|
||||
cp /opt/shelfmark/start.sh /opt/start.sh.bak
|
||||
if command -v chromedriver &>/dev/null; then
|
||||
$STD apt remove -y chromium-driver
|
||||
fi
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "shelfmark" "calibrain/shelfmark" "tarball" "latest" "/opt/shelfmark"
|
||||
RELEASE_VERSION=$(cat "$HOME/.shelfmark")
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"generated": "2026-02-07T12:07:39Z",
|
||||
"generated": "2026-02-06T12:11:58Z",
|
||||
"versions": [
|
||||
{
|
||||
"slug": "2fauth",
|
||||
@@ -256,9 +256,9 @@
|
||||
{
|
||||
"slug": "docmost",
|
||||
"repo": "docmost/docmost",
|
||||
"version": "v0.25.2",
|
||||
"version": "v0.25.1",
|
||||
"pinned": false,
|
||||
"date": "2026-02-06T19:50:55Z"
|
||||
"date": "2026-02-04T15:19:51Z"
|
||||
},
|
||||
{
|
||||
"slug": "domain-locker",
|
||||
@@ -326,9 +326,9 @@
|
||||
{
|
||||
"slug": "firefly",
|
||||
"repo": "firefly-iii/firefly-iii",
|
||||
"version": "v6.4.17",
|
||||
"version": "v6.4.16",
|
||||
"pinned": false,
|
||||
"date": "2026-02-07T06:56:00Z"
|
||||
"date": "2026-01-17T07:54:15Z"
|
||||
},
|
||||
{
|
||||
"slug": "fladder",
|
||||
@@ -480,9 +480,9 @@
|
||||
{
|
||||
"slug": "homarr",
|
||||
"repo": "homarr-labs/homarr",
|
||||
"version": "v1.53.0",
|
||||
"version": "v1.52.0",
|
||||
"pinned": false,
|
||||
"date": "2026-02-06T19:42:58Z"
|
||||
"date": "2026-01-30T19:41:22Z"
|
||||
},
|
||||
{
|
||||
"slug": "homebox",
|
||||
@@ -515,9 +515,9 @@
|
||||
{
|
||||
"slug": "huntarr",
|
||||
"repo": "plexguide/Huntarr.io",
|
||||
"version": "9.2.3",
|
||||
"version": "9.2.1",
|
||||
"pinned": false,
|
||||
"date": "2026-02-07T04:44:20Z"
|
||||
"date": "2026-02-05T16:39:35Z"
|
||||
},
|
||||
{
|
||||
"slug": "inspircd",
|
||||
@@ -543,9 +543,9 @@
|
||||
{
|
||||
"slug": "jackett",
|
||||
"repo": "Jackett/Jackett",
|
||||
"version": "v0.24.1060",
|
||||
"version": "v0.24.1044",
|
||||
"pinned": false,
|
||||
"date": "2026-02-07T05:55:27Z"
|
||||
"date": "2026-02-06T05:55:31Z"
|
||||
},
|
||||
{
|
||||
"slug": "joplin-server",
|
||||
@@ -781,9 +781,9 @@
|
||||
{
|
||||
"slug": "metube",
|
||||
"repo": "alexta69/metube",
|
||||
"version": "2026.02.06",
|
||||
"version": "2026.02.04",
|
||||
"pinned": false,
|
||||
"date": "2026-02-06T14:20:34Z"
|
||||
"date": "2026-02-04T20:01:18Z"
|
||||
},
|
||||
{
|
||||
"slug": "miniflux",
|
||||
@@ -841,13 +841,6 @@
|
||||
"pinned": false,
|
||||
"date": "2025-12-09T09:47:15Z"
|
||||
},
|
||||
{
|
||||
"slug": "nightscout",
|
||||
"repo": "nightscout/cgm-remote-monitor",
|
||||
"version": "15.0.3",
|
||||
"pinned": false,
|
||||
"date": "2025-05-08T22:12:34Z"
|
||||
},
|
||||
{
|
||||
"slug": "nocodb",
|
||||
"repo": "nocodb/nocodb",
|
||||
@@ -1313,9 +1306,9 @@
|
||||
{
|
||||
"slug": "stirling-pdf",
|
||||
"repo": "Stirling-Tools/Stirling-PDF",
|
||||
"version": "v2.4.5",
|
||||
"version": "v2.4.4",
|
||||
"pinned": false,
|
||||
"date": "2026-02-06T23:12:20Z"
|
||||
"date": "2026-02-05T00:15:53Z"
|
||||
},
|
||||
{
|
||||
"slug": "streamlink-webui",
|
||||
@@ -1488,9 +1481,9 @@
|
||||
{
|
||||
"slug": "uptimekuma",
|
||||
"repo": "louislam/uptime-kuma",
|
||||
"version": "2.1.0",
|
||||
"version": "2.0.2",
|
||||
"pinned": false,
|
||||
"date": "2026-02-07T02:31:49Z"
|
||||
"date": "2025-10-22T17:03:54Z"
|
||||
},
|
||||
{
|
||||
"slug": "vaultwarden",
|
||||
@@ -1614,9 +1607,9 @@
|
||||
{
|
||||
"slug": "yubal",
|
||||
"repo": "guillevc/yubal",
|
||||
"version": "v0.4.0",
|
||||
"version": "v4.0.0",
|
||||
"pinned": false,
|
||||
"date": "2026-02-06T21:25:24Z"
|
||||
"date": "2026-02-05T22:42:02Z"
|
||||
},
|
||||
{
|
||||
"slug": "zigbee2mqtt",
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"categories": [
|
||||
0
|
||||
],
|
||||
"date_created": "2026-02-06",
|
||||
"date_created": "2025-02-06",
|
||||
"type": "ct",
|
||||
"updateable": true,
|
||||
"privileged": false,
|
||||
|
||||
@@ -41,15 +41,15 @@
|
||||
"type": "info"
|
||||
},
|
||||
{
|
||||
"text": "**Optional External Apps**: extract zip archives from App Store to `/etc/opencloud/web/assets/apps`",
|
||||
"text": "**Optional External Apps**: extract zip archives from App Store to `/etc/opencloud/assets/apps`",
|
||||
"type": "info"
|
||||
},
|
||||
{
|
||||
"text": "**Optional CalDAV and CardDAV**: requires separate Radicale install. Edit and rename `/etc/opencloud/proxy.yaml.bak` and change your Radicale config to use `http_x_remote_user` as the auth method",
|
||||
"text": "**Optional CalDAV and CardDAV**: requires separate Radicale install. Edit and rename `/opt/opencloud/proxy.yaml.bak` and change your Radicale config to use `http_x_remote_user` as the auth method",
|
||||
"type": "info"
|
||||
},
|
||||
{
|
||||
"text": "**Optional OpenID**: Authelia and PocketID supported. Uncomment relevant lines in `/etc/opencloud/opencloud.env` and consult OpenCloud GitHub discussions for configuration tips",
|
||||
"text": "**Optional OpenID**: Authelia and PocketID supported. Uncomment relevant lines in `/opt/opencloud/opencloud.env` and consult OpenCloud GitHub discussions for configuration tips",
|
||||
"type": "info"
|
||||
},
|
||||
{
|
||||
|
||||
@@ -35,10 +35,6 @@
|
||||
{
|
||||
"text": "The configuration at `/etc/shelfmark/.env` is for bootstrapping the initial install. Customize the configuration via the Shelfmark UI.",
|
||||
"type": "info"
|
||||
},
|
||||
{
|
||||
"text": "This version of the application does not support routing through Tor (the `USING_TOR` env var).",
|
||||
"type": "info"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
"type": "info"
|
||||
},
|
||||
{
|
||||
"text": "By default, only containers with `community-script` or `proxmox-helper-scripts` tags are listed for update. You can override this by using `var_tags='custom-tag|othertag'`.",
|
||||
"text": "Only containers with `community-script` or `proxmox-helper-scripts` tags are listed for update.",
|
||||
"type": "info"
|
||||
},
|
||||
{
|
||||
|
||||
@@ -289,7 +289,7 @@ ML_DIR="${APP_DIR}/machine-learning"
|
||||
GEO_DIR="${INSTALL_DIR}/geodata"
|
||||
mkdir -p {"${APP_DIR}","${UPLOAD_DIR}","${GEO_DIR}","${INSTALL_DIR}"/cache}
|
||||
|
||||
fetch_and_deploy_gh_release "Immich" "immich-app/immich" "tarball" "v2.5.5" "$SRC_DIR"
|
||||
fetch_and_deploy_gh_release "immich" "immich-app/immich" "tarball" "v2.5.3" "$SRC_DIR"
|
||||
PNPM_VERSION="$(jq -r '.packageManager | split("@")[1]' ${SRC_DIR}/package.json)"
|
||||
NODE_VERSION="24" NODE_MODULE="pnpm@${PNPM_VERSION}" setup_nodejs
|
||||
|
||||
@@ -424,7 +424,7 @@ set -a
|
||||
. ${INSTALL_DIR}/.env
|
||||
set +a
|
||||
|
||||
/usr/bin/node --no-warnings ${APP_DIR}/dist/main.js "\$@"
|
||||
/usr/bin/node ${APP_DIR}/dist/main.js "\$@"
|
||||
EOF
|
||||
chmod +x "$ML_DIR"/ml_start.sh "$APP_DIR"/bin/start.sh
|
||||
ln -sf "$APP_DIR"/cli/bin/immich /usr/bin/immich
|
||||
|
||||
@@ -19,7 +19,7 @@ setup_deb822_repo \
|
||||
"ansible" \
|
||||
"https://keyserver.ubuntu.com/pks/lookup?fingerprint=on&op=get&search=0x6125E2A8C77F2818FB7BD15B93C4A3FD7BB9C367" \
|
||||
"http://ppa.launchpad.net/ansible/ansible/ubuntu" \
|
||||
"noble"
|
||||
"jammy"
|
||||
$STD apt install -y ansible
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
|
||||
@@ -14,14 +14,14 @@ network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt install -y unrar-free
|
||||
$STD apt install -y \
|
||||
unrar-free
|
||||
ln -sf /usr/bin/unrar-free /usr/bin/unrar
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
mkdir -p /etc/shelfmark
|
||||
cat <<EOF >/etc/shelfmark/.env
|
||||
DOCKERMODE=false
|
||||
URL_BASE=""
|
||||
CONFIG_DIR=/etc/shelfmark
|
||||
TMP_DIR=/tmp/shelfmark
|
||||
ENABLE_LOGGING=true
|
||||
@@ -111,6 +111,7 @@ else
|
||||
ffmpeg \
|
||||
chromium-common \
|
||||
chromium \
|
||||
chromium-driver \
|
||||
python3-tk
|
||||
msg_ok "Installed internal bypasser dependencies"
|
||||
fi
|
||||
|
||||
@@ -2763,7 +2763,7 @@ Advanced:
|
||||
[[ -n "${CT_TIMEZONE:-}" ]] && echo -e "${INFO}${BOLD}${DGN}Timezone: ${BGN}$CT_TIMEZONE${CL}"
|
||||
[[ "$APT_CACHER" == "yes" ]] && echo -e "${INFO}${BOLD}${DGN}APT Cacher: ${BGN}$APT_CACHER_IP${CL}"
|
||||
echo -e "${SEARCH}${BOLD}${DGN}Verbose Mode: ${BGN}$VERBOSE${CL}"
|
||||
echo -e "${CREATING}${BOLD}${RD}Creating an LXC of ${APP} using the above advanced settings${CL}"
|
||||
echo -e "${CREATING}${BOLD}${RD}Creating a ${APP} LXC using the above advanced settings${CL}"
|
||||
}
|
||||
|
||||
# ==============================================================================
|
||||
|
||||
@@ -488,7 +488,7 @@ spinner() {
|
||||
local i=0
|
||||
while true; do
|
||||
local index=$((i++ % ${#chars[@]}))
|
||||
printf "\r\033[2K%s %b" "${CS_YWB}${TAB}${chars[$index]}${TAB}${CS_CL}" "${CS_YWB}${msg}${CS_CL}"
|
||||
printf "\r\033[2K%s %b" "${CS_YWB}${chars[$index]}${CS_CL}" "${CS_YWB}${msg}${CS_CL}"
|
||||
sleep 0.1
|
||||
done
|
||||
}
|
||||
|
||||
154
misc/tools.func
154
misc/tools.func
@@ -2317,106 +2317,8 @@ function fetch_and_deploy_codeberg_release() {
|
||||
#
|
||||
# # 4. Single binary (chmod +x) like Argus, Promtail etc.
|
||||
# fetch_and_deploy_gh_release "argus" "release-argus/Argus" "singlefile" "0.26.3" "/opt/argus" "Argus-.*linux-amd64"
|
||||
#
|
||||
# Notes:
|
||||
# - For binary/prebuild/singlefile modes: if the target release has no
|
||||
# matching asset, the function scans older releases and prompts the user
|
||||
# (60s timeout, default yes) to use a previous version that has the asset.
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Scans older GitHub releases for a matching asset when the latest release
|
||||
# is missing the expected file. Used internally by fetch_and_deploy_gh_release.
|
||||
#
|
||||
# Arguments:
|
||||
# $1 - GitHub repo (owner/repo)
|
||||
# $2 - mode (binary|prebuild|singlefile)
|
||||
# $3 - asset_pattern (glob pattern for asset filename)
|
||||
# $4 - tag to skip (the already-checked release)
|
||||
#
|
||||
# Output:
|
||||
# Prints the release JSON of the first older release that has a matching asset.
|
||||
# Returns 0 on success, 1 if no matching release found or user declined.
|
||||
# ------------------------------------------------------------------------------
|
||||
_gh_scan_older_releases() {
|
||||
local repo="$1"
|
||||
local mode="$2"
|
||||
local asset_pattern="$3"
|
||||
local skip_tag="$4"
|
||||
|
||||
local header=()
|
||||
[[ -n "${GITHUB_TOKEN:-}" ]] && header=(-H "Authorization: token $GITHUB_TOKEN")
|
||||
|
||||
local releases_list
|
||||
releases_list=$(curl --connect-timeout 10 --max-time 30 -fsSL \
|
||||
-H 'Accept: application/vnd.github+json' \
|
||||
-H 'X-GitHub-Api-Version: 2022-11-28' \
|
||||
"${header[@]}" \
|
||||
"https://api.github.com/repos/${repo}/releases?per_page=15" 2>/dev/null) || return 1
|
||||
|
||||
local count
|
||||
count=$(echo "$releases_list" | jq 'length')
|
||||
|
||||
for ((i = 0; i < count; i++)); do
|
||||
local rel_tag rel_draft rel_prerelease
|
||||
rel_tag=$(echo "$releases_list" | jq -r ".[$i].tag_name")
|
||||
rel_draft=$(echo "$releases_list" | jq -r ".[$i].draft")
|
||||
rel_prerelease=$(echo "$releases_list" | jq -r ".[$i].prerelease")
|
||||
|
||||
# Skip drafts, prereleases, and the tag we already checked
|
||||
[[ "$rel_draft" == "true" || "$rel_prerelease" == "true" ]] && continue
|
||||
[[ "$rel_tag" == "$skip_tag" ]] && continue
|
||||
|
||||
local has_match=false
|
||||
|
||||
if [[ "$mode" == "binary" ]]; then
|
||||
local arch
|
||||
arch=$(dpkg --print-architecture 2>/dev/null || uname -m)
|
||||
[[ "$arch" == "x86_64" ]] && arch="amd64"
|
||||
[[ "$arch" == "aarch64" ]] && arch="arm64"
|
||||
|
||||
# Check with explicit pattern first, then arch heuristic, then any .deb
|
||||
if [[ -n "$asset_pattern" ]]; then
|
||||
has_match=$(echo "$releases_list" | jq -r --arg pat "$asset_pattern" ".[$i].assets[].name" | while read -r name; do
|
||||
case "$name" in $asset_pattern) echo true; break ;; esac
|
||||
done)
|
||||
fi
|
||||
if [[ "$has_match" != "true" ]]; then
|
||||
has_match=$(echo "$releases_list" | jq -r ".[$i].assets[].browser_download_url" | grep -qE "($arch|amd64|x86_64|aarch64|arm64).*\.deb$" && echo true)
|
||||
fi
|
||||
if [[ "$has_match" != "true" ]]; then
|
||||
has_match=$(echo "$releases_list" | jq -r ".[$i].assets[].browser_download_url" | grep -qE '\.deb$' && echo true)
|
||||
fi
|
||||
|
||||
elif [[ "$mode" == "prebuild" || "$mode" == "singlefile" ]]; then
|
||||
has_match=$(echo "$releases_list" | jq -r ".[$i].assets[].name" | while read -r name; do
|
||||
case "$name" in $asset_pattern) echo true; break ;; esac
|
||||
done)
|
||||
fi
|
||||
|
||||
if [[ "$has_match" == "true" ]]; then
|
||||
local rel_version="$rel_tag"
|
||||
[[ "$rel_tag" =~ ^v ]] && rel_version="${rel_tag:1}"
|
||||
|
||||
local use_fallback="y"
|
||||
if [[ -t 0 ]]; then
|
||||
msg_warn "Release ${skip_tag} has no matching asset. Previous release ${rel_tag} has a compatible asset."
|
||||
read -rp "Use version ${rel_tag} instead? [Y/n] (auto-yes in 60s): " -t 60 use_fallback || use_fallback="y"
|
||||
use_fallback="${use_fallback:-y}"
|
||||
fi
|
||||
|
||||
if [[ "${use_fallback,,}" == "y" || "${use_fallback,,}" == "yes" ]]; then
|
||||
echo "$releases_list" | jq ".[$i]"
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
function fetch_and_deploy_gh_release() {
|
||||
local app="$1"
|
||||
local repo="$2"
|
||||
@@ -2556,33 +2458,6 @@ function fetch_and_deploy_gh_release() {
|
||||
done
|
||||
fi
|
||||
|
||||
# Fallback: scan older releases for a matching .deb asset
|
||||
if [[ -z "$url_match" ]]; then
|
||||
local fallback_json
|
||||
if fallback_json=$(_gh_scan_older_releases "$repo" "binary" "$asset_pattern" "$tag_name"); then
|
||||
json="$fallback_json"
|
||||
tag_name=$(echo "$json" | jq -r '.tag_name // .name // empty')
|
||||
[[ "$tag_name" =~ ^v ]] && version="${tag_name:1}" || version="$tag_name"
|
||||
msg_info "Fetching GitHub release: $app ($version)"
|
||||
assets=$(echo "$json" | jq -r '.assets[].browser_download_url')
|
||||
if [[ -n "$asset_pattern" ]]; then
|
||||
for u in $assets; do
|
||||
case "${u##*/}" in $asset_pattern) url_match="$u"; break ;; esac
|
||||
done
|
||||
fi
|
||||
if [[ -z "$url_match" ]]; then
|
||||
for u in $assets; do
|
||||
if [[ "$u" =~ ($arch|amd64|x86_64|aarch64|arm64).*\.deb$ ]]; then url_match="$u"; break; fi
|
||||
done
|
||||
fi
|
||||
if [[ -z "$url_match" ]]; then
|
||||
for u in $assets; do
|
||||
[[ "$u" =~ \.deb$ ]] && url_match="$u" && break
|
||||
done
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -z "$url_match" ]]; then
|
||||
msg_error "No suitable .deb asset found for $app"
|
||||
rm -rf "$tmpdir"
|
||||
@@ -2631,21 +2506,6 @@ function fetch_and_deploy_gh_release() {
|
||||
esac
|
||||
done
|
||||
|
||||
# Fallback: scan older releases for a matching asset
|
||||
if [[ -z "$asset_url" ]]; then
|
||||
local fallback_json
|
||||
if fallback_json=$(_gh_scan_older_releases "$repo" "prebuild" "$pattern" "$tag_name"); then
|
||||
json="$fallback_json"
|
||||
tag_name=$(echo "$json" | jq -r '.tag_name // .name // empty')
|
||||
[[ "$tag_name" =~ ^v ]] && version="${tag_name:1}" || version="$tag_name"
|
||||
msg_info "Fetching GitHub release: $app ($version)"
|
||||
for u in $(echo "$json" | jq -r '.assets[].browser_download_url'); do
|
||||
filename_candidate="${u##*/}"
|
||||
case "$filename_candidate" in $pattern) asset_url="$u"; break ;; esac
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
[[ -z "$asset_url" ]] && {
|
||||
msg_error "No asset matching '$pattern' found"
|
||||
rm -rf "$tmpdir"
|
||||
@@ -2743,20 +2603,6 @@ function fetch_and_deploy_gh_release() {
|
||||
esac
|
||||
done
|
||||
|
||||
# Fallback: scan older releases for a matching asset
|
||||
if [[ -z "$asset_url" ]]; then
|
||||
local fallback_json
|
||||
if fallback_json=$(_gh_scan_older_releases "$repo" "singlefile" "$pattern" "$tag_name"); then
|
||||
json="$fallback_json"
|
||||
tag_name=$(echo "$json" | jq -r '.tag_name // .name // empty')
|
||||
[[ "$tag_name" =~ ^v ]] && version="${tag_name:1}" || version="$tag_name"
|
||||
msg_info "Fetching GitHub release: $app ($version)"
|
||||
for u in $(echo "$json" | jq -r '.assets[].browser_download_url'); do
|
||||
filename_candidate="${u##*/}"
|
||||
case "$filename_candidate" in $pattern) asset_url="$u"; break ;; esac
|
||||
done
|
||||
fi
|
||||
fi
|
||||
[[ -z "$asset_url" ]] && {
|
||||
msg_error "No asset matching '$pattern' found"
|
||||
rm -rf "$tmpdir"
|
||||
|
||||
Reference in New Issue
Block a user