[PR #7328] Harmonize GH Release Check (excl. Pre-Releases & Migrate old "_version.txt" #7085

Open
opened 2025-11-20 08:04:38 -05:00 by saavagebueno · 0 comments
Owner

Original Pull Request: https://github.com/community-scripts/ProxmoxVE/pull/7328

State: closed
Merged: Yes


✍️ Description

  • Filter out drafts and prereleases when fetching releases
    → Behavior now consistent with /releases/latest endpoint used in fetch_and_deploy_gh_release.

  • Added migration logic for legacy version files
    → If ~/.<app> does not exist, the function checks for exactly one /opt/*_version.txt.
    → If found, its content is migrated into ~/.<app> and the legacy file is removed.
    → If multiple legacy files are found, they are ignored to avoid ambiguity.

  • Fixes issue where prerelease tags (e.g. v5.0.0-beta.5) were incorrectly treated as "latest", causing unwanted updates.

  • Provides a smooth upgrade path for older scripts that stored versions in /opt/*_version.txt.

Link: #7325

Prerequisites (X in brackets)

  • Self-review completed – Code follows project standards.
  • Tested thoroughly – Changes work as expected.
  • No security risks – No hardcoded secrets, unnecessary privilege escalations, or permission issues.

🛠️ Type of Change (X in brackets)

  • 🐞 Bug fix – Resolves an issue without breaking functionality.
  • New feature – Adds new, non-breaking functionality.
  • 💥 Breaking change – Alters existing functionality in a way that may require updates.
  • 🆕 New script – A fully functional and tested script or script set.
  • 🌍 Website update – Changes to website-related JSON files or metadata.
  • 🔧 Refactoring / Code Cleanup – Improves readability or maintainability without changing functionality.
  • 📝 Documentation update – Changes to README, AppName.md, CONTRIBUTING.md, or other docs.
**Original Pull Request:** https://github.com/community-scripts/ProxmoxVE/pull/7328 **State:** closed **Merged:** Yes --- <!--🛑 New scripts must be submitted to [ProxmoxVED](https://github.com/community-scripts/ProxmoxVED) for testing. PRs without prior testing will be closed. --> ## ✍️ Description - **Filter out drafts and prereleases** when fetching releases → Behavior now consistent with `/releases/latest` endpoint used in `fetch_and_deploy_gh_release`. - **Added migration logic for legacy version files** → If `~/.<app>` does not exist, the function checks for exactly one `/opt/*_version.txt`. → If found, its content is migrated into `~/.<app>` and the legacy file is removed. → If multiple legacy files are found, they are ignored to avoid ambiguity. - Fixes issue where prerelease tags (e.g. `v5.0.0-beta.5`) were incorrectly treated as "latest", causing unwanted updates. - Provides a smooth upgrade path for older scripts that stored versions in `/opt/*_version.txt`. ## 🔗 Related PR / Issue Link: #7325 ## ✅ Prerequisites (**X** in brackets) - [x] **Self-review completed** – Code follows project standards. - [x] **Tested thoroughly** – Changes work as expected. - [x] **No security risks** – No hardcoded secrets, unnecessary privilege escalations, or permission issues. --- ## 🛠️ Type of Change (**X** in brackets) - [ ] 🐞 **Bug fix** – Resolves an issue without breaking functionality. - [x] ✨ **New feature** – Adds new, non-breaking functionality. - [ ] 💥 **Breaking change** – Alters existing functionality in a way that may require updates. - [ ] 🆕 **New script** – A fully functional and tested script or script set. - [ ] 🌍 **Website update** – Changes to website-related JSON files or metadata. - [ ] 🔧 **Refactoring / Code Cleanup** – Improves readability or maintainability without changing functionality. - [ ] 📝 **Documentation update** – Changes to `README`, `AppName.md`, `CONTRIBUTING.md`, or other docs.
saavagebueno added the pull-request label 2025-11-20 08:04:38 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/ProxmoxVE#7085