Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -240,3 +240,19 @@ jobs:
Write-Host "::error::install.ps1 installed a 0x$machine binary on this runner, expected 0x$env:PE_MACHINE"
exit 1
}

# The documented one-liner, which binds params differently from the
# scriptblock form above. It takes no flags, so it installs the
# latest stable release to the default location.
- name: install.ps1 via irm | iex (Windows PowerShell 5.1)
if: runner.os == 'Windows'
shell: powershell
run: |
irm "$env:RAW_BASE/install.ps1" | iex
$exe = Join-Path $env:USERPROFILE '.local\bin\q2.exe'
$raw = & $exe --version
Write-Host $raw
if ($LASTEXITCODE -ne 0 -or -not $raw) {
Write-Host "::error::q2.exe from the irm | iex install did not run"
exit 1
}
6 changes: 5 additions & 1 deletion install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ param(
[string]$Checksum,
[switch]$NoVerify,
[switch]$Nightly,
[ValidateSet('windows_amd64', 'windows_arm64')]
# No [ValidateSet]: under `irm | iex` it rejects the empty default.
[string]$Platform
)

Expand All @@ -56,6 +56,10 @@ $UA = @{ 'User-Agent' = 'q2-install' }
function Die([string]$msg) { throw "q2 install: $msg" }
function Step([string]$msg) { Write-Host "-> $msg" }

if ($Platform -and $Platform -notin @('windows_amd64', 'windows_arm64')) {
Die "unknown -Platform '$Platform' (expected windows_amd64 or windows_arm64)"
}

if (-not [System.Environment]::Is64BitOperatingSystem) {
Die 'only 64-bit Windows is supported'
}
Expand Down