Compare commits

..

4 Commits

Author SHA1 Message Date
github-actions[bot]
4a4ffa0cdd Update CHANGELOG.md 2026-05-04 20:19:31 +00:00
Copilot
559cfff56a Databasus: move .env to filesystem root so service starts correctly (#14252)
* Initial plan

* Fix Databasus .env file location so service starts correctly

Agent-Logs-Url: https://github.com/community-scripts/ProxmoxVE/sessions/5b4ddcc8-18a3-49b4-9281-b14c712ebb7f

Co-authored-by: MickLesk <47820557+MickLesk@users.noreply.github.com>

* fix(databasus): update service EnvironmentFile path in update_script

Agent-Logs-Url: https://github.com/community-scripts/ProxmoxVE/sessions/b4dcde99-e021-40ce-bdbd-3afc224ab6d4

Co-authored-by: MickLesk <47820557+MickLesk@users.noreply.github.com>

* fix(databasus): only patch service EnvironmentFile if not already updated

Agent-Logs-Url: https://github.com/community-scripts/ProxmoxVE/sessions/47c48b0f-1527-4b9c-a6f5-74c789e79785

Co-authored-by: MickLesk <47820557+MickLesk@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: MickLesk <47820557+MickLesk@users.noreply.github.com>
2026-05-04 22:19:14 +02:00
community-scripts-pr-app[bot]
b353063720 Update CHANGELOG.md (#14253)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-05-04 20:14:29 +00:00
CanbiZ (MickLesk)
26b41d74ee tools.func get_latest_gh_tag - add pagination to find prefixed tags beyond first 50 (#14241)
Co-authored-by: MickLesk <mickey.leskowitz@levelbuild.com>
2026-05-04 22:13:49 +02:00
2 changed files with 26 additions and 6 deletions

View File

@@ -464,12 +464,14 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
- #### 🐞 Bug Fixes
- Databasus: move .env to filesystem root so service starts correctly [@Copilot](https://github.com/Copilot) ([#14252](https://github.com/community-scripts/ProxmoxVE/pull/14252))
- Databasus: update mongo-tools fallback to 100.16.1 and use now pnpm instead of npm ci [@MickLesk](https://github.com/MickLesk) ([#14240](https://github.com/community-scripts/ProxmoxVE/pull/14240))
### 💾 Core
- #### ✨ New Features
- tools.func get_latest_gh_tag - add pagination to find prefixed tags beyond first 50 [@MickLesk](https://github.com/MickLesk) ([#14241](https://github.com/community-scripts/ProxmoxVE/pull/14241))
- tools.func: add GitLab release check/fetch/deploy helpers [@MickLesk](https://github.com/MickLesk) ([#14242](https://github.com/community-scripts/ProxmoxVE/pull/14242))
## 2026-05-03

View File

@@ -2079,15 +2079,33 @@ get_latest_gh_tag() {
local temp_file
temp_file=$(mktemp)
if ! github_api_call "https://api.github.com/repos/${repo}/tags?per_page=50" "$temp_file"; then
rm -f "$temp_file"
return 22
fi
local tag=""
if [[ -n "$prefix" ]]; then
tag=$(jq -r --arg p "$prefix" '[.[] | select(.name | startswith($p))][0].name // empty' "$temp_file")
# Use git/matching-refs API for server-side prefix filtering. This avoids
# paging through unrelated tags (e.g. mongodb/mongo-tools where 100.x tags
# only appear after page 4 of /tags). Returns ALL tags matching the prefix
# in a single call, sorted lexicographically ascending; we pick the
# highest version using `sort -V`.
if ! github_api_call "https://api.github.com/repos/${repo}/git/matching-refs/tags/${prefix}" "$temp_file"; then
rm -f "$temp_file"
return 22
fi
local count
count=$(jq 'length' "$temp_file" 2>/dev/null || echo 0)
if [[ "$count" -gt 0 ]]; then
tag=$(jq -r '.[].ref' "$temp_file" \
| sed 's|^refs/tags/||' \
| sort -V \
| tail -n1)
fi
else
# No prefix: just take the first (newest) tag from /tags
if ! github_api_call "https://api.github.com/repos/${repo}/tags?per_page=1" "$temp_file"; then
rm -f "$temp_file"
return 22
fi
tag=$(jq -r '.[0].name // empty' "$temp_file")
fi