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
Related
Summary
PR #660 adds configurable env vars to
install.shfor 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:APM_INSTALL_DIRapmbinaryGITHUB_URLhttps://github.comAPM_REPOmicrosoft/apmVERSIONKey behaviors to match:
VERSIONis set, skip the GitHub API and construct the download URL directlyGITHUB_URLfor GHE compatibilityirm https://aka.ms/apm-windows | iex -Args @v1.2.3(or equivalent PowerShell pattern)GITHUB_APM_PAT,GITHUB_TOKEN) should work with both API and direct download pathsAcceptance criteria
install.ps1supportsAPM_INSTALL_DIR,GITHUB_URL,APM_REPO,VERSIONenv varsGITHUB_URLRelated