Skip to content

Add air-gapped/GHE configurability to install.ps1 (Windows parity) #668

@sergio-sisternes-epam

Description

@sergio-sisternes-epam

Summary

PR #660 adds configurable env vars to install.sh for air-gapped and GHE environments (APM_INSTALL_DIR, GITHUB_URL, APM_REPO, VERSION). The Windows installer (install.ps1) should support the same configurability so Windows users get an equivalent experience.

Proposed solution

Add the same environment variable support to install.ps1:

Variable Default Description
APM_INSTALL_DIR Platform-appropriate default Directory for the apm binary
GITHUB_URL https://github.com Base URL for downloads (mirrors, GHE)
APM_REPO microsoft/apm GitHub repository
VERSION (latest) Pin a specific release (skips GitHub API)

Key behaviors to match:

  • When VERSION is set, skip the GitHub API and construct the download URL directly
  • Derive the API URL from GITHUB_URL for GHE compatibility
  • Support version pinning via parameter: irm https://aka.ms/apm-windows | iex -Args @v1.2.3 (or equivalent PowerShell pattern)
  • Auth token resolution (GITHUB_APM_PAT, GITHUB_TOKEN) should work with both API and direct download paths

Acceptance criteria

  • install.ps1 supports APM_INSTALL_DIR, GITHUB_URL, APM_REPO, VERSION env vars
  • Version pinning skips GitHub API
  • GHE API URL derived correctly from GITHUB_URL
  • Documentation updated (installation page, apm-guide skill)
  • CHANGELOG entry added

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/distributionInstallers (curl/PowerShell/Brew/Scoop), self-update, devcontainer, codespaces.area/docs-sitedocs/src/content (Starlight), README, doc generation.enhancementDeprecated: use type/feature. Kept for issue history; will be removed in milestone 0.10.0.good first issueGood for newcomerspriority/lowAccepted but not time-sensitivestatus/acceptedDirection approved, safe to start work.status/triagedInitial agentic triage complete; pending maintainer ratification (silence = approval).theme/portabilityOne manifest, every target. Multi-target deploy, marketplace, packaging, install.type/featureNew capability, new flag, new primitive.

    Type

    No type

    Projects

    Status

    In Progress

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions