Files
ProxmoxVE/tools
CanbiZ (MickLesk) 3c02868add update-apps: some improvements (#14275)
* feat(update-apps): add var_continue_on_error and TERM=dumb fix

- Add var_continue_on_error=yes to skip failed containers instead
  of aborting all remaining updates. Useful for cron/unattended runs
  where one disabled or broken script should not stop others.
  Containers with backup still attempt restore on failure regardless.

- Set TERM=dumb when running pct exec to prevent whiptail from
  hanging when no TTY is available (e.g. cron jobs redirecting
  stdout/stderr). This causes whiptail to fail-fast instead of
  blocking indefinitely.

- Add var_continue_on_error to export_config_json, --help output,
  and usage examples (cron-style invocation example added).

* feat(update-apps): add var_dry_run to check updates without applying

Adds dry-run mode (var_dry_run=yes) that reports available updates for
all selected containers without modifying anything:

- Extracts GitHub source repo from the ct script header (# Source:)
- Resolves the version file name from check_for_gh_release app arg
- Reads current installed version from ~/.appname inside the container
- Queries GitHub API /releases/latest for comparison
- Outputs color-coded status: up-to-date (green), update available (yellow),
  or unknown (blue/yellow with reason)

Non-GitHub sources (Codeberg, custom URLs) are skipped with a notice.
Resource scaling is suppressed entirely during dry-run.

Example usage:
  var_container=all_running var_skip_confirm=yes var_dry_run=yes \
    bash -c "$(curl -fsSL .../update-apps.sh)"

* fix(update-apps): dry-run uses check_for_gh_release args, not Source header

The # Source: header can point to a different repo than what
check_for_gh_release actually queries (e.g. RustDesk uses
lejianwen fork, not official rustdesk repo).

Now parse both app name and source repo directly from the
check_for_gh_release call in the ct script:
  check_for_gh_release "appname" "owner/repo"

Also fix $HOME/.appname path expansion in pct exec context.

* fix issue on clear()

* feat(update-apps): add no-op clear wrapper to PATH for update scripts

Co-authored-by: Copilot <copilot@github.com>

* feat(update-apps): enhance error handling for unattended mode in resource checks

Co-authored-by: Copilot <copilot@github.com>

* feat(update-apps): implement structured logging and summary report for updates

Co-authored-by: Copilot <copilot@github.com>

* fix log issue

Co-authored-by: Copilot <copilot@github.com>

* feat(update-apps): enhance dry-run functionality and logging for container updates

Co-authored-by: Copilot <copilot@github.com>

* feat(update-apps): add dry-run completion message for better user feedback

Co-authored-by: Copilot <copilot@github.com>

---------

Co-authored-by: Copilot <copilot@github.com>
2026-05-07 15:53:22 +02:00
..