mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-05-16 21:44:56 +02:00
Compare commits
13 Commits
2026-05-12
...
refactor/o
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fdb0f484df | ||
|
|
e68ea29996 | ||
|
|
79926030ae | ||
|
|
4fde0c0427 | ||
|
|
0a81ff53fd | ||
|
|
cd5816b263 | ||
|
|
d18d473583 | ||
|
|
af529716b1 | ||
|
|
2c950db3ac | ||
|
|
904f0bdd3c | ||
|
|
de08fc45d4 | ||
|
|
9e009c1dfd | ||
|
|
03ca1543d9 |
23
CHANGELOG.md
23
CHANGELOG.md
@@ -461,6 +461,29 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
||||
|
||||
</details>
|
||||
|
||||
## 2026-05-14
|
||||
|
||||
### 🆕 New Scripts
|
||||
|
||||
- CLIProxyAPI ([#14443](https://github.com/community-scripts/ProxmoxVE/pull/14443))
|
||||
|
||||
## 2026-05-13
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- Fix: Broken Manifold update [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#14468](https://github.com/community-scripts/ProxmoxVE/pull/14468))
|
||||
- SoulSync: Fix update function [@tremor021](https://github.com/tremor021) ([#14465](https://github.com/community-scripts/ProxmoxVE/pull/14465))
|
||||
- Reactive-Resume: fix PDF generation timeout in LXC containers [@MickLesk](https://github.com/MickLesk) ([#14416](https://github.com/community-scripts/ProxmoxVE/pull/14416))
|
||||
- (calibre-web) Add --no-sandbox for PDF conversion [@jamesmyatt](https://github.com/jamesmyatt) ([#14461](https://github.com/community-scripts/ProxmoxVE/pull/14461))
|
||||
|
||||
### 💾 Core
|
||||
|
||||
- #### 🔧 Refactor
|
||||
|
||||
- tools.func: encode GitHub tag, refine pin logic, add Codeberg [@MickLesk](https://github.com/MickLesk) ([#14473](https://github.com/community-scripts/ProxmoxVE/pull/14473))
|
||||
|
||||
## 2026-05-12
|
||||
|
||||
### 🆕 New Scripts
|
||||
|
||||
55
ct/cliproxyapi.sh
Normal file
55
ct/cliproxyapi.sh
Normal file
@@ -0,0 +1,55 @@
|
||||
#!/usr/bin/env bash
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: mathiasnagler
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/router-for-me/CLIProxyAPI
|
||||
|
||||
APP="CLIProxyAPI"
|
||||
var_tags="${var_tags:-ai;proxy}"
|
||||
var_cpu="${var_cpu:-1}"
|
||||
var_ram="${var_ram:-512}"
|
||||
var_disk="${var_disk:-2}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
if [[ ! -d /opt/cliproxyapi ]]; then
|
||||
msg_error "No CLIProxyAPI Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
if check_for_gh_release "cliproxyapi" "router-for-me/CLIProxyAPI"; then
|
||||
msg_info "Stopping CLIProxyAPI"
|
||||
systemctl stop cliproxyapi
|
||||
msg_ok "Stopped CLIProxyAPI"
|
||||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "cliproxyapi" "router-for-me/CLIProxyAPI" "prebuild" "latest" "/opt/cliproxyapi" "CLIProxyAPI_*_linux_amd64.tar.gz"
|
||||
|
||||
msg_info "Starting CLIProxyAPI"
|
||||
systemctl start cliproxyapi
|
||||
msg_ok "Started CLIProxyAPI"
|
||||
msg_ok "Updated successfully!"
|
||||
fi
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
build_container
|
||||
description
|
||||
|
||||
msg_ok "Completed successfully!\n"
|
||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8317${CL}"
|
||||
6
ct/headers/cliproxyapi
Normal file
6
ct/headers/cliproxyapi
Normal file
@@ -0,0 +1,6 @@
|
||||
________ ________ ___ ____ ____
|
||||
/ ____/ / / _/ __ \_________ _ ____ __/ | / __ \/ _/
|
||||
/ / / / / // /_/ / ___/ __ \| |/_/ / / / /| | / /_/ // /
|
||||
/ /___/ /____/ // ____/ / / /_/ /> </ /_/ / ___ |/ ____// /
|
||||
\____/_____/___/_/ /_/ \____/_/|_|\__, /_/ |_/_/ /___/
|
||||
/____/
|
||||
@@ -55,9 +55,20 @@ function update_script() {
|
||||
|
||||
RUBY_VERSION=${RUBY_INSTALL_VERSION} RUBY_INSTALL_RAILS="true" HOME=/home/manyfold setup_ruby
|
||||
|
||||
msg_info "Installing Manyfold"
|
||||
msg_info "Restoring Data"
|
||||
rm -rf /opt/manyfold/app/{storage,tmp,config/credentials.yml.enc,config/master.key}
|
||||
cp -r /opt/manyfold_storage_backup /opt/manyfold/app/storage 2>/dev/null || true
|
||||
cp -r /opt/manyfold_tmp_backup /opt/manyfold/app/tmp 2>/dev/null || true
|
||||
cp /opt/manyfold_credentials.yml.enc /opt/manyfold/app/config/credentials.yml.enc 2>/dev/null || true
|
||||
cp /opt/manyfold_master.key /opt/manyfold/app/config/master.key 2>/dev/null || true
|
||||
chown -R manyfold:manyfold {/home/manyfold,/opt/manyfold}
|
||||
chown -R manyfold:manyfold /opt/manyfold
|
||||
chown -R manyfold:manyfold /opt/manyfold/app/storage /opt/manyfold/app/tmp /opt/manyfold/app/config
|
||||
rm -rf /opt/manyfold_storage_backup /opt/manyfold_tmp_backup /opt/manyfold_credentials.yml.enc /opt/manyfold_master.key
|
||||
msg_ok "Restored Data"
|
||||
|
||||
msg_info "Installing Manyfold"
|
||||
$STD npm install --global corepack
|
||||
$STD corepack enable yarn
|
||||
|
||||
sudo -u manyfold bash -c '
|
||||
source /opt/manyfold/.env
|
||||
@@ -66,7 +77,6 @@ function update_script() {
|
||||
cd /opt/manyfold/app
|
||||
gem install bundler sidekiq foreman
|
||||
bundle install
|
||||
corepack enable yarn
|
||||
corepack prepare '"$YARN_VERSION"' --activate
|
||||
corepack use '"$YARN_VERSION"'
|
||||
bin/rails db:migrate
|
||||
@@ -74,16 +84,6 @@ function update_script() {
|
||||
'
|
||||
msg_ok "Installed Manyfold"
|
||||
|
||||
msg_info "Restoring Data"
|
||||
rm -rf /opt/manyfold/app/{storage,tmp,config/credentials.yml.enc,config/master.key}
|
||||
cp -r /opt/manyfold_storage_backup /opt/manyfold/app/storage 2>/dev/null || true
|
||||
cp -r /opt/manyfold_tmp_backup /opt/manyfold/app/tmp 2>/dev/null || true
|
||||
cp /opt/manyfold_credentials.yml.enc /opt/manyfold/app/config/credentials.yml.enc 2>/dev/null || true
|
||||
cp /opt/manyfold_master.key /opt/manyfold/app/config/master.key 2>/dev/null || true
|
||||
chown -R manyfold:manyfold /opt/manyfold/app/storage /opt/manyfold/app/tmp /opt/manyfold/app/config
|
||||
rm -rf /opt/manyfold_storage_backup /opt/manyfold_tmp_backup /opt/manyfold_credentials.yml.enc /opt/manyfold_master.key
|
||||
msg_ok "Restored Data"
|
||||
|
||||
msg_info "Restarting Services"
|
||||
source /opt/manyfold/.env
|
||||
export PATH="/home/manyfold/.rbenv/shims:/home/manyfold/.rbenv/bin:$PATH"
|
||||
|
||||
28
ct/ollama.sh
28
ct/ollama.sh
@@ -27,34 +27,26 @@ function update_script() {
|
||||
msg_error "No Ollama Installation Found!"
|
||||
exit
|
||||
fi
|
||||
RELEASE=$(curl -fsSL https://api.github.com/repos/ollama/ollama/releases/latest | grep "tag_name" | awk -F '"' '{print $4}')
|
||||
if [[ ! -f /opt/Ollama_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/Ollama_version.txt)" ]]; then
|
||||
if [[ ! -f /opt/Ollama_version.txt ]]; then
|
||||
touch /opt/Ollama_version.txt
|
||||
fi
|
||||
if check_for_gh_release "ollama" "ollama/ollama"; then
|
||||
ensure_dependencies zstd
|
||||
msg_info "Stopping Services"
|
||||
systemctl stop ollama
|
||||
msg_ok "Services Stopped"
|
||||
|
||||
TMP_TAR=$(mktemp --suffix=.tar.zst)
|
||||
curl -fL# -C - -o "${TMP_TAR}" "https://github.com/ollama/ollama/releases/download/${RELEASE}/ollama-linux-amd64.tar.zst"
|
||||
msg_info "Updating Ollama to ${RELEASE}"
|
||||
rm -rf /usr/local/lib/ollama
|
||||
rm -rf /usr/local/bin/ollama
|
||||
mkdir -p /usr/local/lib/ollama
|
||||
tar --zstd -xf "${TMP_TAR}" -C /usr/local/lib/ollama
|
||||
ln -sf /usr/local/lib/ollama/bin/ollama /usr/local/bin/ollama
|
||||
rm -f "${TMP_TAR}"
|
||||
echo "${RELEASE}" >/opt/Ollama_version.txt
|
||||
msg_ok "Updated Ollama to ${RELEASE}"
|
||||
OLLAMA_INSTALL_DIR="/usr/local/lib/ollama"
|
||||
rm -rf "$OLLAMA_INSTALL_DIR" /usr/local/bin/ollama
|
||||
mkdir -p "$OLLAMA_INSTALL_DIR"
|
||||
if ! fetch_and_deploy_gh_release "ollama" "ollama/ollama" "prebuild" "latest" "$OLLAMA_INSTALL_DIR" "ollama-linux-amd64.tar.zst"; then
|
||||
msg_error "Download or deployment failed – check network connectivity and GitHub API availability"
|
||||
exit 250
|
||||
fi
|
||||
ln -sf "$OLLAMA_INSTALL_DIR/bin/ollama" /usr/local/bin/ollama
|
||||
msg_ok "Updated Ollama"
|
||||
|
||||
msg_info "Starting Services"
|
||||
systemctl start ollama
|
||||
msg_ok "Started Services"
|
||||
msg_ok "Updated successfully!"
|
||||
else
|
||||
msg_ok "No update required. Ollama is already at ${RELEASE}"
|
||||
fi
|
||||
exit
|
||||
}
|
||||
|
||||
@@ -91,37 +91,22 @@ EOF
|
||||
|
||||
if [ -x "/usr/bin/ollama" ]; then
|
||||
msg_info "Checking for Ollama Update"
|
||||
OLLAMA_VERSION=$(ollama -v | awk '{print $NF}')
|
||||
RELEASE=$(curl -s https://api.github.com/repos/ollama/ollama/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4)}')
|
||||
if [ "$OLLAMA_VERSION" != "$RELEASE" ]; then
|
||||
msg_info "Ollama update available: v$OLLAMA_VERSION -> v$RELEASE"
|
||||
msg_info "Downloading Ollama v$RELEASE \n"
|
||||
curl -fS#LO https://github.com/ollama/ollama/releases/download/v${RELEASE}/ollama-linux-amd64.tar.zst
|
||||
msg_ok "Download Complete"
|
||||
if check_for_gh_release "ollama" "ollama/ollama"; then
|
||||
msg_info "Stopping Ollama Service"
|
||||
systemctl stop ollama
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
if [ -f "ollama-linux-amd64.tar.zst" ]; then
|
||||
|
||||
msg_info "Stopping Ollama Service"
|
||||
systemctl stop ollama
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
msg_info "Installing Ollama"
|
||||
rm -rf /usr/lib/ollama
|
||||
rm -rf /usr/bin/ollama
|
||||
tar --zstd -C /usr -xf ollama-linux-amd64.tar.zst
|
||||
rm -rf ollama-linux-amd64.tar.zst
|
||||
msg_ok "Installed Ollama"
|
||||
|
||||
msg_info "Starting Ollama Service"
|
||||
systemctl start ollama
|
||||
msg_ok "Started Service"
|
||||
|
||||
msg_ok "Ollama updated to version $RELEASE"
|
||||
rm -rf /usr/lib/ollama /usr/bin/ollama
|
||||
if ! fetch_and_deploy_gh_release "ollama" "ollama/ollama" "prebuild" "latest" "/usr/lib/ollama" "ollama-linux-amd64.tar.zst"; then
|
||||
msg_error "Ollama download or deployment failed – check network connectivity and GitHub API availability"
|
||||
else
|
||||
msg_error "Ollama download failed. Aborting update."
|
||||
ln -sf /usr/lib/ollama/bin/ollama /usr/bin/ollama
|
||||
msg_ok "Updated Ollama to ${CHECK_UPDATE_RELEASE}"
|
||||
fi
|
||||
else
|
||||
msg_ok "Ollama is already up to date."
|
||||
|
||||
msg_info "Starting Ollama Service"
|
||||
systemctl start ollama
|
||||
msg_ok "Started Service"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ function update_script() {
|
||||
msg_info "Updating Python Dependencies"
|
||||
cd /opt/soulsync
|
||||
$STD uv venv --clear /opt/soulsync/.venv --python 3.11
|
||||
$STD /opt/soulsync/.venv/bin/pip install -r requirements.txt
|
||||
$STD uv pip install -r requirements.txt
|
||||
msg_ok "Updated Python Dependencies"
|
||||
|
||||
mv /opt/soulsync-config.bak /opt/soulsync/config
|
||||
|
||||
@@ -52,6 +52,7 @@ After=network.target
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
Environment="QTWEBENGINE_CHROMIUM_FLAGS=--no-sandbox"
|
||||
WorkingDirectory=/opt/calibre-web
|
||||
ExecStart=/opt/calibre-web/.venv/bin/python /opt/calibre-web/cps.py
|
||||
Restart=on-failure
|
||||
|
||||
64
install/cliproxyapi-install.sh
Normal file
64
install/cliproxyapi-install.sh
Normal file
@@ -0,0 +1,64 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: mathiasnagler
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/router-for-me/CLIProxyAPI
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt install -y openssl
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
fetch_and_deploy_gh_release "cliproxyapi" "router-for-me/CLIProxyAPI" "prebuild" "latest" "/opt/cliproxyapi" "CLIProxyAPI_*_linux_amd64.tar.gz"
|
||||
|
||||
msg_info "Configuring CLIProxyAPI"
|
||||
MANAGEMENT_PASSWORD=$(openssl rand -hex 32)
|
||||
API_KEY="sk-$(openssl rand -hex 16)"
|
||||
cat <<EOF >/opt/cliproxyapi/config.yaml
|
||||
host: ""
|
||||
port: 8317
|
||||
auth-dir: "/root/.cli-proxy-api"
|
||||
remote-management:
|
||||
allow-remote: true
|
||||
secret-key: "${MANAGEMENT_PASSWORD}"
|
||||
api-keys:
|
||||
- "${API_KEY}"
|
||||
request-retry: 3
|
||||
quota-exceeded:
|
||||
switch-project: true
|
||||
switch-preview-model: true
|
||||
routing:
|
||||
strategy: "round-robin"
|
||||
EOF
|
||||
msg_ok "Configured CLIProxyAPI"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/cliproxyapi.service
|
||||
[Unit]
|
||||
Description=CLIProxyAPI
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=/opt/cliproxyapi
|
||||
ExecStart=/opt/cliproxyapi/cli-proxy-api
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now cliproxyapi
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
@@ -62,26 +62,15 @@ $STD apt install -y --no-install-recommends intel-basekit-2024.1
|
||||
msg_ok "Installed Intel® oneAPI Base Toolkit"
|
||||
|
||||
msg_info "Installing Ollama (Patience)"
|
||||
RELEASE=$(curl -fsSL https://api.github.com/repos/ollama/ollama/releases/latest | grep "tag_name" | awk -F '"' '{print $4}')
|
||||
OLLAMA_INSTALL_DIR="/usr/local/lib/ollama"
|
||||
BINDIR="/usr/local/bin"
|
||||
mkdir -p $OLLAMA_INSTALL_DIR
|
||||
OLLAMA_URL="https://github.com/ollama/ollama/releases/download/${RELEASE}/ollama-linux-amd64.tar.zst"
|
||||
TMP_TAR="/tmp/ollama.tar.zst"
|
||||
echo -e "\n"
|
||||
if curl -fL# -C - -o "$TMP_TAR" "$OLLAMA_URL"; then
|
||||
if tar --zstd -xf "$TMP_TAR" -C "$OLLAMA_INSTALL_DIR"; then
|
||||
ln -sf "$OLLAMA_INSTALL_DIR/bin/ollama" "$BINDIR/ollama"
|
||||
echo "${RELEASE}" >/opt/Ollama_version.txt
|
||||
msg_ok "Installed Ollama ${RELEASE}"
|
||||
else
|
||||
msg_error "Extraction failed – archive corrupt or incomplete"
|
||||
exit 251
|
||||
fi
|
||||
else
|
||||
msg_error "Download failed – $OLLAMA_URL not reachable"
|
||||
mkdir -p "$OLLAMA_INSTALL_DIR"
|
||||
if ! fetch_and_deploy_gh_release "ollama" "ollama/ollama" "prebuild" "latest" "$OLLAMA_INSTALL_DIR" "ollama-linux-amd64.tar.zst"; then
|
||||
msg_error "Failed to download or deploy Ollama – check network connectivity and GitHub API availability"
|
||||
exit 250
|
||||
fi
|
||||
ln -sf "$OLLAMA_INSTALL_DIR/bin/ollama" "$BINDIR/ollama"
|
||||
msg_ok "Installed Ollama"
|
||||
|
||||
msg_info "Creating ollama User and Group"
|
||||
if ! id ollama >/dev/null 2>&1; then
|
||||
|
||||
@@ -73,11 +73,11 @@ EOF
|
||||
msg_ok "Installed Intel® oneAPI Base Toolkit"
|
||||
|
||||
msg_info "Installing Ollama"
|
||||
OLLAMA_RELEASE=$(curl -fsSL https://api.github.com/repos/ollama/ollama/releases/latest | grep "tag_name" | awk -F '"' '{print $4}')
|
||||
curl -fsSLO -C - https://github.com/ollama/ollama/releases/download/${OLLAMA_RELEASE}/ollama-linux-amd64.tar.zst
|
||||
tar --zstd -C /usr -xf ollama-linux-amd64.tar.zst
|
||||
rm -rf ollama-linux-amd64.tar.zst
|
||||
cat <<EOF >/etc/systemd/system/ollama.service
|
||||
if ! fetch_and_deploy_gh_release "ollama" "ollama/ollama" "prebuild" "latest" "/usr/lib/ollama" "ollama-linux-amd64.tar.zst"; then
|
||||
msg_error "Failed to download or deploy Ollama – check network connectivity and GitHub API availability"
|
||||
else
|
||||
ln -sf /usr/lib/ollama/bin/ollama /usr/bin/ollama
|
||||
cat <<EOF >/etc/systemd/system/ollama.service
|
||||
[Unit]
|
||||
Description=Ollama Service
|
||||
After=network-online.target
|
||||
@@ -93,9 +93,10 @@ RestartSec=3
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now ollama
|
||||
echo "ENABLE_OLLAMA_API=true" >/root/.env
|
||||
msg_ok "Installed Ollama"
|
||||
systemctl enable -q --now ollama
|
||||
echo "ENABLE_OLLAMA_API=true" >/root/.env
|
||||
msg_ok "Installed Ollama"
|
||||
fi
|
||||
fi
|
||||
|
||||
msg_info "Creating Service"
|
||||
|
||||
@@ -55,7 +55,7 @@ DATABASE_URL=postgresql://${PG_DB_USER}:${PG_DB_PASS}@localhost:5432/${PG_DB_NAM
|
||||
AUTH_SECRET=${AUTH_SECRET}
|
||||
|
||||
# Printer (headless Chromium for PDF generation)
|
||||
PRINTER_ENDPOINT=http://localhost:9222
|
||||
PRINTER_ENDPOINT=http://127.0.0.1:9222
|
||||
|
||||
# Storage: uses local filesystem (/opt/reactive-resume/data) when S3 is not configured
|
||||
# S3_ACCESS_KEY_ID=
|
||||
@@ -92,7 +92,7 @@ After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/chromium --headless --disable-gpu --no-sandbox --disable-dev-shm-usage --remote-debugging-address=127.0.0.1 --remote-debugging-port=9222
|
||||
ExecStart=/usr/bin/chromium --headless --disable-gpu --no-sandbox --no-zygote --disable-dev-shm-usage --remote-debugging-address=127.0.0.1 --remote-debugging-port=9222
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
|
||||
|
||||
@@ -2394,11 +2394,12 @@ check_for_gh_release() {
|
||||
|
||||
# For pinned versions, query the specific release tag directly
|
||||
if [[ -n "$pinned_version_in" ]]; then
|
||||
local pinned_version_encoded="${pinned_version_in//\//%2F}"
|
||||
http_code=$(curl -sSL --max-time 20 -w "%{http_code}" -o /tmp/gh_check.json \
|
||||
-H 'Accept: application/vnd.github+json' \
|
||||
-H 'X-GitHub-Api-Version: 2022-11-28' \
|
||||
"${header_args[@]}" \
|
||||
"https://api.github.com/repos/${source}/releases/tags/${pinned_version_in}" 2>/dev/null) || true
|
||||
"https://api.github.com/repos/${source}/releases/tags/${pinned_version_encoded}" 2>/dev/null) || true
|
||||
|
||||
if [[ "$http_code" == "200" ]] && [[ -s /tmp/gh_check.json ]]; then
|
||||
releases_json="[$(</tmp/gh_check.json)]"
|
||||
@@ -2520,11 +2521,19 @@ check_for_gh_release() {
|
||||
rm -f "${legacy_files[0]}"
|
||||
fi
|
||||
fi
|
||||
current="${current#v}"
|
||||
if [[ "$current" =~ ^v[0-9] ]]; then
|
||||
current="${current:1}"
|
||||
fi
|
||||
|
||||
|
||||
# Pinned version handling
|
||||
if [[ -n "$pinned_version_in" ]]; then
|
||||
local pin_clean="${pinned_version_in#v}"
|
||||
local pin_clean
|
||||
if [[ "$pinned_version_in" =~ ^v[0-9] ]]; then
|
||||
pin_clean="${pinned_version_in:1}"
|
||||
else
|
||||
pin_clean="$pinned_version_in"
|
||||
fi
|
||||
local match_raw=""
|
||||
for i in "${!clean_tags[@]}"; do
|
||||
if [[ "${clean_tags[$i]}" == "$pin_clean" ]]; then
|
||||
@@ -2562,7 +2571,6 @@ check_for_gh_release() {
|
||||
msg_ok "No update available: ${app} (${latest_clean})"
|
||||
return 1
|
||||
}
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Checks for new Codeberg release (latest tag).
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user