NAME
Developer::Dashboard::CLI::Upgrade - safe cross-platform dashboard self-upgrade
SYNOPSIS
use Developer::Dashboard::CLI::Upgrade;
exit Developer::Dashboard::CLI::Upgrade::run_upgrade(args => \@ARGV);
DESCRIPTION
This module implements the first-class dashboard upgrade and d2 upgrade behavior outside the thin public switchboard. It downloads the canonical HTTPS bootstrap installer for the active platform, validates that the response has the expected Developer Dashboard installer shape, writes it to a private temporary file, and executes it using an argv list.
PURPOSE
Provide an explicit self-upgrade path that reuses the project's established cross-platform bootstrap behavior while keeping remote content validation and process status visible.
WHY IT EXISTS
Requiring users to remember and retype a remote installer pipeline makes upgrades harder to discover and easier to perform inconsistently. A built-in command gives both public entrypoints one tested, auditable route without embedding installer logic in bin/dashboard.
WHEN TO USE
Use this module when changing installer selection, HTTPS download behavior, remote-content validation, dry-run reporting, or platform process invocation for dashboard self-upgrades.
HOW TO USE
Call run_upgrade(args => \@ARGV) from the staged built-in helper. Users run dashboard upgrade or d2 upgrade; --dry-run prints the platform and installer URL without downloading or executing anything.
WHAT USES IT
The staged upgrade helper, both public CLI entrypoints, focused acceptance tests, and the cross-platform install E2E matrix use this module.
EXAMPLES
dashboard upgrade --dry-run
dashboard upgrade
d2 upgrade