Skip to content

The agent that grows with you

ci(install-e2e): windows composes install x update - one driver, one job

ethernetadf7d55f4b63
diff --git a/.github/workflows/install-e2e-windows-run.yml b/.github/workflows/install-e2e-windows-run.yml
index f1e99531044..cd043151d2b 100644
--- a/.github/workflows/install-e2e-windows-run.yml
+++ b/.github/workflows/install-e2e-windows-run.yml
@@ -1,48 +1,34 @@
-name: Install & Update E2E — Windows desktop (reusable)
-
-# Runs ONE Windows {install-method, update-method} combination: install
-# OLD, then update OLD -> HEAD through the route a user would take.
+# Reusable runner for ONE Windows install/update combination.
#
-# The Windows sibling of install-e2e-run.yml. No bubblewrap anywhere -- the
-# drivers fake GitHub with git's own transport rewrite: a driver-owned
-# GIT_CONFIG_GLOBAL carrying url.<file://serve.git>.insteadOf for both
-# canonical repo URLs, so the installer and updater run byte-for-byte
-# against their real URLs and land on a local bare repo. Its `main` serves
-# OLD (install-ref, default: the newest release tag) during the install,
-# then advances to HEAD for the update leg -- an update becomes available
-# exactly the way it does for a real user.
+# One job, two orthogonal axes: tests/install/windows-e2e.ps1 dispatches its
+# install phase on install-method and its update phase on update-method, so
+# implementing a new pair is a driver function + a gate edit here - never a
+# new job. The driver's phases share state via the workroot, and every leg
+# runs the REAL user surface for its methods:
#
-# Two install arms, two drivers:
-# desktop-installer@latest the REAL desktop user flow
-# (tests/install/windows-desktop-gui-e2e.ps1):
-# the website's published Hermes-Setup.exe runs
-# headed, AutoHotkey clicks Install -> Launch,
-# the real Electron window must appear. Update
-# methods:
-# open-app-update the app's own Update
-# button, app launched from the
-# installed Hermes.exe: it runs
-# under Playwright's Electron
-# driver, which clicks Settings
-# -> About -> "Update now"; the
-# production hand-off chain runs
-# untouched.
-# (hermes-update, desktop-installer@latest,
-# installer-script re-run,
-# hermes-desktop-app-update: declared TODOs.)
-# installer-script the irm | iex one-liner
-# (tests/install/windows-installer-script-e2e
-# .ps1): runs the install.ps1 shipped AT the
-# OLD ref, headless. Update methods:
-# hermes-update venv hermes.exe update
-# installer-script re-run HEAD's install.ps1
-# (open-app-update and
-# hermes-desktop-app-update from a script
-# install: TODO.)
+# desktop-installer@latest the website's Hermes-Setup.exe, downloaded and
+# run headed, AutoHotkey clicks Install ->
+# Launch, the real Electron window must appear.
+# installer-script the irm | iex one-liner: the install.ps1
+# shipped AT the OLD ref, headless.
+# installer-script+desktop the same one-liner with -IncludeDesktop:
+# builds Hermes.exe AND registers Start Menu /
+# Desktop shortcuts.
+# hermes-update venv hermes.exe update.
+# open-app-update the app's own Update button, app launched
+# from the installed exe under Playwright's
+# Electron driver (Settings -> About ->
+# "Update now"); the production hand-off chain
+# runs untouched.
+# hermes-desktop-app-update the same button, app launched via `hermes
+# desktop`: the driver captures the product's
+# own spawn (argv/cwd/env) and re-executes it
+# under Playwright.
#
-# Method pairs without a driver yet NATIVELY SKIP (grey check, no runner):
-# the capability knowledge lives here, next to the drivers, so the caller
-# can dispatch every declared combination without knowing which ones work.
+# Method pairs without a driver arm yet NATIVELY SKIP (grey check, no
+# runner): the capability knowledge lives here, next to the driver, so the
+# caller can dispatch every declared combination without knowing which ones
+# work.
#
# Call it:
#
@@ -54,6 +40,8 @@ name: Install & Update E2E — Windows desktop (reusable)
# update-method: open-app-update
# install-ref: v2026.8.3
+name: install-e2e windows leg
+
on:
workflow_call:
inputs:
@@ -62,7 +50,7 @@ on:
required: true
type: string
update-method:
- description: 'How the install updates to HEAD. Supported: open-app-update (Update button under Playwright, app launched from the installed exe, from a desktop install) and hermes-update / installer-script (from a script install). Declared-but-TODO pairs (incl. hermes-desktop-app-update) skip.'
+ description: 'How the install updates to HEAD. Supported: open-app-update (Update button under Playwright, from a desktop-bearing install), hermes-desktop-app-update (same button, app launched via hermes desktop), hermes-update, installer-script, installer-script+desktop. desktop-installer@latest re-run is a declared TODO and skips.'
required: true
type: string
install-ref:
@@ -90,15 +78,24 @@ permissions:
contents: read
jobs:
- # ---- arm 1: install via the website's Hermes-Setup.exe (GUI) -------------
e2e:
- name: Hermes-Setup.exe
- # The one pair the driver can run today, and only from a starting
- # version that ships the desktop app (the caller annotates
- # tag-has-desktop from the tag's own tree; releases before #20059 have
- # no window to launch and no Update button to click). Anything else is
- # a native skip: a declared-TODO method pair, or a pre-desktop tag.
- if: inputs.install-method == 'desktop-installer@latest' && inputs.update-method == 'open-app-update' && inputs.tag-has-desktop
+ # Short static name on purpose: name expressions render UNEXPANDED on
+ # skipped jobs.
+ name: e2e
+ # The implemented {install x update} pairs. Two rules feed the table:
+ # * every desktop-surface method needs the starting tag to ship
+ # apps/desktop (pre-desktop releases have no window to launch, no
+ # Update button to click, no -IncludeDesktop to pass);
+ # * open-app-update needs an OS entry point, which only the
+ # desktop-bearing installs create.
+ # desktop-installer@latest as an UPDATE method is the one declared TODO.
+ if: >-
+ (inputs.install-method == 'installer-script'
+ || (contains(fromJSON('["installer-script+desktop", "desktop-installer@latest"]'), inputs.install-method) && inputs.tag-has-desktop))
+ && (contains(fromJSON('["hermes-update", "installer-script"]'), inputs.update-method)
+ || (contains(fromJSON('["installer-script+desktop", "hermes-desktop-app-update"]'), inputs.update-method) && inputs.tag-has-desktop)
+ || (inputs.update-method == 'open-app-update' && inputs.tag-has-desktop
+ && contains(fromJSON('["desktop-installer@latest", "installer-script+desktop"]'), inputs.install-method)))
runs-on: windows-latest
timeout-minutes: ${{ inputs.timeout-minutes }}
@@ -112,9 +109,8 @@ jobs:
steps:
# Full history: the driver bare-clones this checkout as the repo the
- # installer/updater talk to, and the installer's baked release pin
- # must be reachable in that clone. A shallow checkout cannot serve
- # either need.
+ # installer/updater talk to, and both OLD and HEAD must be reachable
+ # in that clone. A shallow checkout cannot serve either need.
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
@@ -131,15 +127,15 @@ jobs:
- name: Stage serve repo (main -> ${{ inputs.install-ref }})
shell: powershell
- run: powershell -NoProfile -ExecutionPolicy Bypass -File tests\install\windows-desktop-gui-e2e.ps1 -Phase stage -Route "${{ inputs.update-method }}" -InstallRef "${{ inputs.install-ref }}" -SetupExeUrl ${{ inputs.setup-exe-url }}
+ run: powershell -NoProfile -ExecutionPolicy Bypass -File tests\install\windows-e2e.ps1 -Phase stage -InstallMethod "${{ inputs.install-method }}" -Route "${{ inputs.update-method }}" -InstallRef "${{ inputs.install-ref }}" -SetupExeUrl ${{ inputs.setup-exe-url }}
- - name: Install ${{ inputs.install-ref }} via website Hermes-Setup.exe (headed, AHK-clicked)
+ - name: Install ${{ inputs.install-ref }} (${{ inputs.install-method }})
shell: powershell
- run: powershell -NoProfile -ExecutionPolicy Bypass -File tests\install\windows-desktop-gui-e2e.ps1 -Phase install-gui -Route "${{ inputs.update-method }}" -InstallRef "${{ inputs.install-ref }}" -SetupExeUrl ${{ inputs.setup-exe-url }}
+ run: powershell -NoProfile -ExecutionPolicy Bypass -File tests\install\windows-e2e.ps1 -Phase install -InstallMethod "${{ inputs.install-method }}" -Route "${{ inputs.update-method }}" -InstallRef "${{ inputs.install-ref }}" -SetupExeUrl ${{ inputs.setup-exe-url }}
- name: Update ${{ inputs.install-ref }} -> HEAD (${{ inputs.update-method }})
shell: powershell
- run: powershell -NoProfile -ExecutionPolicy Bypass -File tests\install\windows-desktop-gui-e2e.ps1 -Phase update-gui -Route "${{ inputs.update-method }}" -InstallRef "${{ inputs.install-ref }}" -SetupExeUrl ${{ inputs.setup-exe-url }}
+ run: powershell -NoProfile -ExecutionPolicy Bypass -File tests\install\windows-e2e.ps1 -Phase update -InstallMethod "${{ inputs.install-method }}" -Route "${{ inputs.update-method }}" -InstallRef "${{ inputs.install-ref }}" -SetupExeUrl ${{ inputs.setup-exe-url }}
- name: Stop screen recording
if: always()
@@ -158,6 +154,7 @@ jobs:
$home_ = Join-Path $work "hermes-home"
foreach ($pair in @(
@{ src = (Join-Path $work "proof"); dst = "proof" },
+ @{ src = (Join-Path $work "logs"); dst = "driver-logs" },
@{ src = (Join-Path $work "shas.json"); dst = "shas.json" },
@{ src = (Join-Path $home_ "logs"); dst = "logs" },
@{ src = (Join-Path $home_ ".hermes-update-result.json"); dst = ".hermes-update-result.json" }
@@ -169,60 +166,7 @@ jobs:
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
- name: install-e2e-windows-${{ inputs.update-method }}-${{ inputs.install-ref }}-${{ github.sha }}
+ name: install-e2e-windows-${{ inputs.install-method }}-${{ inputs.update-method }}-${{ inputs.install-ref }}-${{ github.sha }}
path: gui-e2e-proof
retention-days: 14
if-no-files-found: ignore
-
- # ---- arm 2: install via the irm | iex one-liner (headless) ---------------
- script-e2e:
- # Same static-name reasoning as e2e above.
- name: install.ps1
- # The pairs the script driver can run today. open-app-update and
- # hermes-desktop-app-update from a script install are declared TODOs
- # (the desktop app also has to be BUILT by
- # that path first). The +desktop variants also need the starting tag
- # to ship apps/desktop (the -IncludeDesktop parameter shipped with it).
- if: >-
- (inputs.install-method == 'installer-script'
- || (inputs.install-method == 'installer-script+desktop' && inputs.tag-has-desktop))
- && (contains(fromJSON('["hermes-update", "installer-script"]'), inputs.update-method)
- || (inputs.update-method == 'installer-script+desktop' && inputs.tag-has-desktop))
- runs-on: windows-latest
- timeout-minutes: ${{ inputs.timeout-minutes }}
-
- steps:
- # Full history: the driver bare-clones this checkout as the repo the
- # installer/updater talk to, and both OLD and HEAD must be reachable
- # in that clone.
- - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- with:
- fetch-depth: 0
-
- - name: Start screen recording
- uses: ./.github/actions/e2e-screen-record
- with:
- mode: start
- output: ${{ runner.temp }}\e2e-logs\recording.mkv
-
- - name: Run install + update E2E
- shell: powershell
- run: powershell -NoProfile -ExecutionPolicy Bypass -File tests\install\windows-installer-script-e2e.ps1 -InstallMethod "${{ inputs.install-method }}" -UpdateMethod "${{ inputs.update-method }}" -InstallRef "${{ inputs.install-ref }}"
- env:
- HERMES_E2E_LOG_DIR: ${{ runner.temp }}\e2e-logs
-
- - name: Stop screen recording
- if: always()
- uses: ./.github/actions/e2e-screen-record
- with:
- mode: stop
- output: ${{ runner.temp }}\e2e-logs\recording.mkv
-
- - name: Upload installer logs
- if: always()
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
- with:
- name: install-e2e-windows-script-${{ inputs.update-method }}-${{ inputs.install-ref }}-${{ github.sha }}
- path: ${{ runner.temp }}\e2e-logs
- retention-days: 14
- if-no-files-found: ignore
diff --git a/scripts/sandbox/generate-e2e-matrix.mjs b/scripts/sandbox/generate-e2e-matrix.mjs
index 16cb8e176f1..c50a4385460 100644
--- a/scripts/sandbox/generate-e2e-matrix.mjs
+++ b/scripts/sandbox/generate-e2e-matrix.mjs
@@ -254,10 +254,10 @@ export function renderMarkdownPlan(envs, tags) {
*/
export function renderMarkdownResults(jobs) {
const LEG = /^(linux|windows|macos): (\S+) -> (\S+) \((\S+) -> HEAD\) \//;
- // A combination can surface as SEVERAL jobs with the same leg name (the
- // windows run workflow has one arm per driver; exactly one runs and the
- // others natively skip), so cells merge by significance: a real outcome
- // always beats a skip, and a bad outcome beats a good one.
+ // A combination can surface as SEVERAL jobs with the same leg name (a
+ // run workflow may have one inner job per driver arm; exactly one runs
+ // and the others natively skip), so cells merge by significance: a real
+ // outcome always beats a skip, and a bad outcome beats a good one.
const RANK = ['skip', '&#x2705;', 'running', 'cancelled', '&#x274C;'];
/** @type {Map<string, Map<string, string>>} */
const rows = new Map();
diff --git a/scripts/windows_e2e_harness.ps1 b/scripts/windows_e2e_harness.ps1
new file mode 100644
index 00000000000..4ad2d0e2ecf
--- /dev/null
+++ b/scripts/windows_e2e_harness.ps1
@@ -0,0 +1,48 @@
+# Local harness for windows-e2e.ps1's non-GUI logic, runnable under linux
+# pwsh (nix run nixpkgs#powershell). Exercises the pieces that cost CI
+# round-trips when wrong: parameter surface, ref-flag probing, and the
+# install/update dispatch reaching the right arm names.
+param()
+$ErrorActionPreference = "Stop"
+$driver = Join-Path $PSScriptRoot "..\tests\install\windows-e2e.ps1"
+
+# 1. Parse cleanly.
+$tok = $null; $err = $null
+[System.Management.Automation.Language.Parser]::ParseFile((Resolve-Path $driver), [ref]$tok, [ref]$err) | Out-Null
+if ($err -and $err.Count) { $err | ForEach-Object { Write-Host $_.Message }; exit 1 }
+Write-Host "parse: OK"
+
+# 2. Parameter surface: both axes present with the generator's ids.
+$ast = [System.Management.Automation.Language.Parser]::ParseFile((Resolve-Path $driver), [ref]$tok, [ref]$err)
+$params = $ast.ParamBlock.Parameters
+$byName = @{}
+foreach ($p in $params) { $byName[$p.Name.VariablePath.UserPath] = $p }
+foreach ($required in @("Phase", "InstallMethod", "Route", "InstallRef")) {
+ if (-not $byName.ContainsKey($required)) { Write-Host "missing param: $required"; exit 1 }
+}
+$imSet = ($byName["InstallMethod"].Attributes | Where-Object { $_.TypeName.Name -eq "ValidateSet" }).PositionalArguments.Value
+foreach ($m in @("desktop-installer@latest", "installer-script", "installer-script+desktop")) {
+ if ($imSet -notcontains $m) { Write-Host "InstallMethod ValidateSet missing $m"; exit 1 }
+}
+$rSet = ($byName["Route"].Attributes | Where-Object { $_.TypeName.Name -eq "ValidateSet" }).PositionalArguments.Value
+foreach ($m in @("open-app-update", "hermes-desktop-app-update", "hermes-update", "installer-script", "installer-script+desktop", "desktop-installer@latest")) {
+ if ($rSet -notcontains $m) { Write-Host "Route ValidateSet missing $m"; exit 1 }
+}
+Write-Host "parameter surface: OK"
+
+# 3. Dispatch bodies reference the right arms (AST-level: the switch on
+# InstallMethod contains the three arms; the switch on Route contains all
+# six, with desktop-installer@latest throwing).
+$text = Get-Content -LiteralPath $driver -Raw
+foreach ($needle in @(
+ 'function Invoke-PhaseInstall',
+ 'function Invoke-PhaseUpdate',
+ 'Invoke-RefInstaller $state.old "old" -IncludeDesktop',
+ 'Invoke-HermesDesktopAppUpdate $state.current',
+ 'Invoke-HermesUpdate',
+ "update method 'desktop-installer@latest' is not implemented yet"
+)) {
+ if ($text.IndexOf($needle) -lt 0) { Write-Host "dispatch missing: $needle"; exit 1 }
+}
+Write-Host "dispatch arms: OK"
+Write-Host "ALL HARNESS CHECKS PASSED"
diff --git a/tests/install/README.md b/tests/install/README.md
index 54cb7f89575..c50c32444e6 100644
--- a/tests/install/README.md
+++ b/tests/install/README.md
@@ -11,7 +11,7 @@ The test family has four layers. Each layer has one job.
1. `scripts/sandbox/generate-e2e-matrix.mjs` declares the support matrix. It lists every {os, install-method, update-method} pair. It expands the pairs against the sampled release tags. It knows nothing about which pairs CI can run.
2. `.github/workflows/install-e2e.yml` is the primary workflow. It picks the release tags, runs the generator, and fans out one matrix job per OS. It also writes the plan chart and the result chart on the run summary.
3. The run workflows own the capability knowledge. `install-e2e-run.yml` serves linux and macos with one OS-agnostic driver. `install-e2e-windows-run.yml` serves windows. A job-level `if:` gate in each run workflow lists the pairs its driver can run. All other pairs skip natively and show as grey.
-4. The drivers do the work. `tests/install/installer-script-e2e.sh` is the POSIX driver. `tests/install/windows-installer-script-e2e.ps1` is the windows script driver. `tests/install/windows-desktop-gui-e2e.ps1` is the windows GUI driver.
+4. The drivers do the work. `tests/install/installer-script-e2e.sh` is the POSIX driver. `tests/install/windows-e2e.ps1` is the windows driver; its install phase and update phase dispatch on separate method parameters, so any implemented update method can follow any implemented install method.
To declare a new method, edit the generator. To implement a method, flip the gate in the run workflow and extend a driver.
@@ -33,7 +33,7 @@ Each leg with the script drivers has these phases:
4. Update: move `main` to HEAD. Apply one update method. Make sure that the checkout is at HEAD and that `hermes --version` works.
5. Desktop smoke again, at HEAD.
-The windows GUI driver replaces phases 2 and 4. It downloads the published `Hermes-Setup.exe`, clicks through the installer window with AutoHotkey, and clicks "Update now" in the running app with Playwright.
+The windows GUI driver replaces phases 2 and 4 when the install method is `desktop-installer@latest`. It downloads the published `Hermes-Setup.exe`, clicks through the installer window with AutoHotkey, and clicks "Update now" in the running app with Playwright.
## Old versions
diff --git a/tests/install/installer-script-e2e.sh b/tests/install/installer-script-e2e.sh
index b07e36a4dc2..77be0c0f6e0 100755
--- a/tests/install/installer-script-e2e.sh
+++ b/tests/install/installer-script-e2e.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# Prove a user who installed OLD via the installer script can reach HEAD.
#
-# The POSIX sibling of tests/install/windows-desktop-gui-e2e.ps1, sharing its
+# The POSIX sibling of tests/install/windows-e2e.ps1, sharing its
# staging trick and replacing the old bubblewrap sandbox: instead of a fake
# Internet (MITM proxy + upload-pack shim), every git process is pointed at a
# local bare clone with url.<file://serve.git>.insteadOf rewrites for both
diff --git a/tests/install/windows-desktop-gui-e2e.ps1 b/tests/install/windows-e2e.ps1
similarity index 76%
rename from tests/install/windows-desktop-gui-e2e.ps1
rename to tests/install/windows-e2e.ps1
index a77feeba09d..60739e1e7f8 100644
--- a/tests/install/windows-desktop-gui-e2e.ps1
+++ b/tests/install/windows-e2e.ps1
@@ -61,22 +61,31 @@
# Real GUI users are on the official origin and never see it.
#
# USAGE (local Windows box or CI):
-# powershell -File tests\install\windows-desktop-gui-e2e.ps1 -Phase all
-# ... -Phase stage / install-gui / update-gui
+# powershell -File tests\install\windows-e2e.ps1 -Phase all
+# ... -Phase stage / install / update
# Phases share state via <workroot>\shas.json, so CI can run them as
-# separate steps for readable logs.
+# separate steps for readable logs. -InstallMethod and -Route are
+# orthogonal axes: the install phase dispatches on -InstallMethod, the
+# update phase on -Route, and install writes what update needs (paths,
+# how OLD landed) into the shared state - so any implemented update can
+# follow any implemented install.
# ============================================================================
param(
- [ValidateSet("stage", "install-gui", "update-gui", "all")]
+ [ValidateSet("stage", "install", "update", "all")]
[string]$Phase = "all",
- # Update method to exercise in the update-gui phase, named by the same
- # ids the combination generator (scripts/sandbox/generate-e2e-matrix
- # .mjs) declares. Only "open-app-update" (the app's own Update button,
- # app launched from the installed exe) is implemented; the others are
- # declared arms so the surface is stable when they land.
- [ValidateSet("open-app-update", "hermes-desktop-app-update", "hermes-update", "desktop-installer@latest", "installer-script")]
+ # How OLD gets installed, named by the same ids the combination
+ # generator (scripts/sandbox/generate-e2e-matrix.mjs) declares.
+ [ValidateSet("desktop-installer@latest", "installer-script", "installer-script+desktop")]
+ [string]$InstallMethod = "desktop-installer@latest",
+
+ # Update method to exercise in the update phase, same id namespace.
+ # open-app-update (from a desktop-installer install) and hermes-update /
+ # installer-script / installer-script+desktop (from script installs) are
+ # implemented; the rest are declared arms so the surface is stable when
+ # they land.
+ [ValidateSet("open-app-update", "hermes-desktop-app-update", "hermes-update", "desktop-installer@latest", "installer-script", "installer-script+desktop")]
[string]$Route = "open-app-update",
# The OLD version: the ref served as `main` while the installer runs,
@@ -209,6 +218,130 @@ function Test-HermesRuns([string]$Label) {
Assert-True ($LASTEXITCODE -eq 0) "$Label -- hermes --version exits 0"
}
+# ----------------------------------------------------------------------------
+# Script-install arm: the irm | iex one-liner, headless (the install.ps1
+# shipped AT the ref under test, run with flags probed from that ref's own
+# script text - older releases reject parameters added later).
+# ----------------------------------------------------------------------------
+function Write-LogGroup([string]$Title, [string]$LogPath) {
+ Write-Host "::group::$Title"
+ if (Test-Path -LiteralPath $LogPath) { Get-Content -LiteralPath $LogPath | Write-Host }
+ Write-Host "::endgroup::"
+}
+
+function Invoke-RefInstaller {
+ param([string]$Ref, [string]$Label, [switch]$IncludeDesktop)
+ $script = Join-Path $WorkRoot "install-$Label.ps1"
+ (Invoke-Git @("-C", $RepoRoot, "show", "$Ref`:scripts/install.ps1")) -join "`n" |
+ Set-Content -LiteralPath $script -Encoding UTF8
+ $flags = @("-SkipSetup", "-HermesHome", $HermesHome, "-InstallDir", $InstallDir)
+ $text = Get-Content -LiteralPath $script -Raw
+ if ($text -match '\$NonInteractive') { $flags += "-NonInteractive" }
+ if ($IncludeDesktop) {
+ # The desktop stage is the point of this leg: a ref without the
+ # parameter is a hard failure, not a silent plain install.
+ if ($text -notmatch '\$IncludeDesktop') {
+ throw "E2E ASSERTION FAILED: ref $Ref does not support -IncludeDesktop; this leg cannot mean what it claims"
+ }
+ $flags += "-IncludeDesktop"
+ }
+ New-Item -ItemType Directory -Path (Join-Path $WorkRoot "logs") -Force | Out-Null
+ $log = Join-Path $WorkRoot "logs\install-$Label.log"
+ $prevEap = $ErrorActionPreference; $ErrorActionPreference = "Continue"
+ & powershell -NoProfile -ExecutionPolicy Bypass -File $script @flags *> $log
+ $installExit = $LASTEXITCODE
+ $ErrorActionPreference = $prevEap
+ Write-LogGroup "install.ps1 ($Label) transcript" $log
+ Assert-True ($installExit -eq 0) "install.ps1 ($Label) exited 0"
+}
+
+function Assert-DesktopArtifact([string]$Label) {
+ Assert-True ($null -ne (Get-DesktopExe)) "$Label -- desktop app built by installer under apps\desktop\release"
+}
+
+function Invoke-HermesUpdate {
+ # The venv updater. --yes reaches the update subcommand only in later
+ # releases; ask the installed binary, never parse its source.
+ $hermesExe = Join-Path $InstallDir "venv\Scripts\hermes.exe"
+ $updateArgs = @("update")
+ $prevEap = $ErrorActionPreference; $ErrorActionPreference = "Continue"
+ $helpText = & $hermesExe update --help 2>&1 | Out-String
+ if ($helpText -match '--yes') { $updateArgs += "--yes" }
+ New-Item -ItemType Directory -Path (Join-Path $WorkRoot "logs") -Force | Out-Null
+ $log = Join-Path $WorkRoot "logs\update.log"
+ Push-Location $InstallDir
+ try {
+ & $hermesExe @updateArgs *> $log
+ $updateExit = $LASTEXITCODE
+ } finally {
+ Pop-Location
+ $ErrorActionPreference = $prevEap
+ }
+ Write-LogGroup "hermes update transcript" $log
+ Assert-True ($updateExit -eq 0) "hermes update exited 0"
+}
+
+function Invoke-HermesDesktopAppUpdate([string]$TargetSha) {
+ # The hermes-desktop launch surface: `hermes desktop` runs its whole
+ # real pipeline; the driver intercepts the product's final spawn
+ # (argv/cwd/env captured by e2e-assets/launch-capture/sitecustomize.py)
+ # and re-executes it under Playwright, which clicks Update now.
+ $hermesExe = Join-Path $InstallDir "venv\Scripts\hermes.exe"
+ $spec = Join-Path $WorkRoot "launch-spec.json"
+ New-Item -ItemType Directory -Path (Join-Path $WorkRoot "logs") -Force | Out-Null
+ $log = Join-Path $WorkRoot "logs\desktop-launch-capture.log"
+
+ $capDir = Join-Path $AssetsDir "launch-capture"
+ $prevPy = $env:PYTHONPATH
+ $prevCap = $env:HERMES_E2E_CAPTURE_LAUNCH
+ $env:PYTHONPATH = if ($prevPy) { "$capDir;$prevPy" } else { $capDir }
+ $env:HERMES_E2E_CAPTURE_LAUNCH = $spec
+ $prevEap = $ErrorActionPreference; $ErrorActionPreference = "Continue"
+ Push-Location $InstallDir
+ try {
+ & $hermesExe desktop *> $log
+ $capExit = $LASTEXITCODE
+ } finally {
+ Pop-Location
+ $ErrorActionPreference = $prevEap
+ $env:PYTHONPATH = $prevPy
+ $env:HERMES_E2E_CAPTURE_LAUNCH = $prevCap
+ }
+ Write-LogGroup "hermes desktop (launch capture) transcript" $log
+ Assert-True ($capExit -eq 0) "hermes desktop exited 0 during launch capture"
+ Assert-True (Test-Path -LiteralPath "$spec.captured") "a launch was actually captured (exit 0 without a launch must not pass)"
+
+ $node = Get-ManagedNode
+ $driverDir = Join-Path $WorkRoot "pw-driver"
+ New-Item -ItemType Directory -Path $driverDir -Force | Out-Null
+ $npmCli = Join-Path (Split-Path -Parent $node) "node_modules\npm\bin\npm-cli.js"
+ Assert-True (Test-Path -LiteralPath $npmCli) "managed npm exists beside the managed node"
+ Push-Location $driverDir
+ try {
+ & $node $npmCli install --no-save --no-audit --no-fund "@playwright/test@$PlaywrightVersion" 2>&1 |
+ Select-Object -Last 5 | ForEach-Object { Write-Host " npm| $_" }
+ $npmExit = $LASTEXITCODE
+ } finally {
+ Pop-Location
+ }
+ Assert-True ($npmExit -eq 0) "npm install @playwright/test@$PlaywrightVersion into the driver dir"
+
+ Copy-Item (Join-Path $AssetsDir "launch-from-spec.mjs") (Join-Path $driverDir "launch-from-spec.mjs") -Force
+ $prevEap = $ErrorActionPreference; $ErrorActionPreference = "Continue"
+ Push-Location $driverDir
+ try {
+ & $node "launch-from-spec.mjs" --spec $spec `
+ --result (Join-Path $HermesHome ".hermes-update-result.json") `
+ --expect-sha $TargetSha --repo-dir $InstallDir 2>&1 |
+ ForEach-Object { Write-Host " pw| $_" }
+ $driveExit = $LASTEXITCODE
+ } finally {
+ Pop-Location
+ $ErrorActionPreference = $prevEap
+ }
+ Assert-True ($driveExit -eq 0) "app driven via captured hermes desktop spec; update completed"
+}
+
function Save-DesktopScreenshot([string]$OutFile) {
# Single full-desktop screenshot (primary screen).
try {
@@ -633,23 +766,70 @@ function Invoke-GuiUpdateDesktopRoute([string]$TargetSha) {
}
}
-function Invoke-PhaseUpdateGui {
+function Invoke-PhaseInstall {
+ # Dispatch on the install axis. Each arm ends with the same contract:
+ # checkout at OLD, hermes runs, and state carries how OLD landed so any
+ # update arm can follow any install arm.
$state = Read-State
+ # Isolated install target for every arm; serve.git's file:// origin
+ # looks like a fork to the updater, whose "add the official repo as
+ # upstream?" prompt would hang a headless run - the marker is the
+ # product's own suppression mechanism.
+ $env:HERMES_HOME = $HermesHome
+ New-Item -ItemType Directory -Path $HermesHome -Force | Out-Null
+ New-Item -ItemType File -Path (Join-Path $HermesHome ".skip_upstream_prompt") -Force | Out-Null
+ switch ($InstallMethod) {
+ "desktop-installer@latest" {
+ Invoke-PhaseInstallGui
+ }
+ "installer-script" {
+ Write-Step "INSTALL (script): OLD's own install.ps1, headless"
+ Invoke-RefInstaller $state.old "old"
+ Assert-True ((Get-InstalledHead) -eq $state.old) "installed checkout is at OLD"
+ Test-HermesRuns "post-install-script"
+ }
+ "installer-script+desktop" {
+ Write-Step "INSTALL (script+desktop): OLD's own install.ps1 -IncludeDesktop, headless"
+ Invoke-RefInstaller $state.old "old" -IncludeDesktop
+ Assert-True ((Get-InstalledHead) -eq $state.old) "installed checkout is at OLD"
+ Test-HermesRuns "post-install-script-desktop"
+ Assert-DesktopArtifact "OLD"
+ }
+ }
+}
+
+function Invoke-PhaseUpdate {
+ $state = Read-State
+ $env:HERMES_HOME = $HermesHome
+
+ # The update becomes available the way it does for a real user: the
+ # remote's main moves forward. The GUI route re-advances harmlessly
+ # (same sha); script routes need it here because only the GUI arm's
+ # helper used to own this step.
+ Invoke-Git @("-C", $ServeRepo, "update-ref", "refs/heads/main", $state.current) | Out-Null
+ Write-Host " serve.git main advanced to $($state.current)"
+
switch ($Route) {
"open-app-update" {
+ # Meaningful only where an OS entry point exists - install.ps1
+ # -IncludeDesktop registers shortcuts too, so both desktop-
+ # bearing installs qualify; the workflow gate enforces which
+ # pairs are dispatched.
Invoke-GuiUpdateDesktopRoute $state.current
}
"hermes-desktop-app-update" {
- # TODO: launch the app via `hermes desktop` (spawn interception
- # captures the real argv/cwd/env; Playwright launches from the
- # captured spec), then the same Update-now click.
- throw "update method 'hermes-desktop-app-update' is not implemented yet"
+ Invoke-HermesDesktopAppUpdate $state.current
}
"hermes-update" {
- # TODO: run `hermes update` from the installed venv -- the CLI
- # route. Needs the same completion/sha asserts minus the
- # app-quit dance.
- throw "update method 'hermes-update' is not implemented yet"
+ Invoke-HermesUpdate
+ }
+ "installer-script" {
+ # A user re-running the one-liner today gets the CURRENT script.
+ Invoke-RefInstaller $state.current "head"
+ }
+ "installer-script+desktop" {
+ Invoke-RefInstaller $state.current "head" -IncludeDesktop
+ Assert-DesktopArtifact "HEAD"
}
"desktop-installer@latest" {
# TODO: re-run the bootstrap Hermes-Setup.exe over the existing
@@ -657,19 +837,18 @@ function Invoke-PhaseUpdateGui {
# runs unattended).
throw "update method 'desktop-installer@latest' is not implemented yet"
}
- "installer-script" {
- # TODO: re-run the irm | iex one-liner over the existing
- # install.
- throw "update method 'installer-script' is not implemented yet"
- }
}
+
+ Assert-True ((Get-InstalledHead) -eq $state.current) "checkout landed on HEAD"
+ Test-HermesRuns "post-update"
}
# ----------------------------------------------------------------------------
# Dispatch
# ----------------------------------------------------------------------------
-Write-Host "Windows Desktop GUI E2E driver (real user flow)"
+Write-Host "Windows install/update E2E driver (real user flows)"
Write-Host " phase: $Phase"
+Write-Host " install: $InstallMethod"
Write-Host " route: $Route"
Write-Host " repo: $RepoRoot"
Write-Host " workroot: $WorkRoot"
@@ -677,13 +856,13 @@ Write-Host " workroot: $WorkRoot"
Set-GitRedirect
switch ($Phase) {
- "stage" { Invoke-PhaseStage }
- "install-gui" { Invoke-PhaseInstallGui }
- "update-gui" { Invoke-PhaseUpdateGui }
+ "stage" { Invoke-PhaseStage }
+ "install" { Invoke-PhaseInstall }
+ "update" { Invoke-PhaseUpdate }
"all" {
Invoke-PhaseStage
- Invoke-PhaseInstallGui
- Invoke-PhaseUpdateGui
+ Invoke-PhaseInstall
+ Invoke-PhaseUpdate
}
}
diff --git a/tests/install/windows-installer-script-e2e.ps1 b/tests/install/windows-installer-script-e2e.ps1
deleted file mode 100644
index 53fdf4cca89..00000000000
--- a/tests/install/windows-installer-script-e2e.ps1
+++ /dev/null
@@ -1,289 +0,0 @@
-# Prove a Windows user who installed OLD via the installer script (irm |
-# iex) can reach HEAD.
-#
-# The install.ps1 sibling of tests/install/installer-script-e2e.sh, sharing
-# its staging trick with the GUI driver (windows-desktop-gui-e2e.ps1):
-# every git process is pointed at a local bare clone with
-# url.<file://serve.git>.insteadOf rewrites for both canonical repo URLs in
-# a driver-owned GIT_CONFIG_GLOBAL. The installer and updater run
-# byte-for-byte against their real URLs and land on serve.git; `main`
-# serves OLD during the install, then advances to HEAD for the update leg.
-# (NOT GIT_CONFIG_COUNT/KEY_n/VALUE_n env config -- install.ps1 SETS those
-# itself and would clobber ours.)
-#
-# install.ps1 itself is not downloaded: the install leg runs the copy
-# shipped AT the OLD ref (what a user who installed then actually
-# executed), and the installer-script update leg runs HEAD's copy (what
-# the website serves at update time).
-#
-# Usage:
-# powershell -File tests\install\windows-installer-script-e2e.ps1 `
-# -UpdateMethod hermes-update -InstallRef v0.20.2
-#
-# -UpdateMethod hermes-update venv\Scripts\hermes.exe update
-# installer-script re-run install.ps1 (HEAD's copy)
-# -InstallRef what to install first; anything git resolves. auto =
-# the newest release tag in the checkout.
-#
-# Requires a clean full-history checkout with release tags fetched.
-# PowerShell 5.1-safe, pure ASCII (OEM codepages explode on fancy dashes).
-
-#Requires -Version 5.1
-
-param(
- [ValidateSet("installer-script", "installer-script+desktop")]
- [string]$InstallMethod = "installer-script",
- [ValidateSet("hermes-update", "installer-script", "installer-script+desktop")]
- [string]$UpdateMethod = "hermes-update",
- [string]$InstallRef = "auto"
-)
-
-$ErrorActionPreference = "Stop"
-
-$RepoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).Path
-$RepoUrlSsh = "[email protected]:NousResearch/hermes-agent.git"
-$RepoUrlHttps = "https://github.com/NousResearch/hermes-agent.git"
-
-# Everything lives OUTSIDE the checkout; an untracked dir inside the repo
-# would trip the dirty-tree guard below on the next run.
-$WorkRoot = Join-Path $(if ($env:RUNNER_TEMP) { $env:RUNNER_TEMP } else { $env:TEMP }) "hermes-installer-script-e2e"
-$LogDir = if ($env:HERMES_E2E_LOG_DIR) { $env:HERMES_E2E_LOG_DIR } else { Join-Path $WorkRoot "logs" }
-$ServeRepo = Join-Path $WorkRoot "serve.git"
-
-function Step([string]$Message) { Write-Host "`n=== $Message ===" }
-function Ok([string]$Message) { Write-Host " OK $Message" }
-function Fail([string]$Message) {
- Write-Host "E2E ASSERTION FAILED: $Message" -ForegroundColor Red
- exit 1
-}
-# Full transcript in the job log, collapsed (GitHub renders ::group:: as a
-# fold). Win or lose -- a green install's log is how you diagnose the leg
-# that fails next.
-function Write-LogGroup([string]$Title, [string]$LogPath) {
- Write-Host "::group::$Title"
- if (Test-Path -LiteralPath $LogPath) { Get-Content -LiteralPath $LogPath | Write-Host }
- Write-Host "::endgroup::"
-}
-
-function Invoke-Git {
- param([string[]]$GitArgs)
- $out = & git @GitArgs 2>&1
- if ($LASTEXITCODE -ne 0) {
- Fail "git $($GitArgs -join ' ') exited $LASTEXITCODE`: $out"
- }
- return $out
-}
-
-if (Test-Path -LiteralPath $WorkRoot) { Remove-Item -Recurse -Force -LiteralPath $WorkRoot }
-New-Item -ItemType Directory -Path $WorkRoot, $LogDir -Force | Out-Null
-
-# --- stage: serve.git with main parked at OLD --------------------------------
-
-Step "staging serve.git (main -> OLD)"
-# Tracked changes only (-uno): untracked files cannot leak into a bare clone.
-$dirty = Invoke-Git @("-C", $RepoRoot, "status", "--porcelain", "-uno")
-if ($dirty) { Fail "checkout has uncommitted tracked changes; the staged clone must be a reviewable commit" }
-
-if ($InstallRef -eq "auto") {
- $tags = (Invoke-Git @("-C", $RepoRoot, "tag", "--list", "v[0-9]*", "--sort=-creatordate")) -split "`r?`n"
- $InstallRef = $tags | Select-Object -First 1
- if (-not $InstallRef) { Fail "no release tags in the checkout to use as OLD" }
-}
-$OldSha = (Invoke-Git @("-C", $RepoRoot, "rev-parse", "$InstallRef^{commit}")).Trim()
-$HeadSha = (Invoke-Git @("-C", $RepoRoot, "rev-parse", "HEAD")).Trim()
-if ($OldSha -eq $HeadSha) { Fail "OLD ($InstallRef) IS HEAD; no update would be available" }
-
-Invoke-Git @("clone", "--bare", "--quiet", $RepoRoot, $ServeRepo) | Out-Null
-Invoke-Git @("-C", $ServeRepo, "update-ref", "refs/heads/main", $OldSha) | Out-Null
-Invoke-Git @("-C", $ServeRepo, "symbolic-ref", "HEAD", "refs/heads/main") | Out-Null
-# The installer may pin a commit that is reachable but not at a ref tip.
-Invoke-Git @("-C", $ServeRepo, "config", "uploadpack.allowAnySHA1InWant", "true") | Out-Null
-Ok "serve.git main = $OldSha ($InstallRef), update target $HeadSha"
-
-# --- the git URL redirect ------------------------------------------------------
-
-$gitCfg = Join-Path $WorkRoot "gitconfig"
-$serveUrl = "file:///" + ($ServeRepo -replace "\\", "/")
-@"
-[url "$serveUrl"]
- insteadOf = $RepoUrlHttps
- insteadOf = $RepoUrlSsh
-"@ | Set-Content -LiteralPath $gitCfg -Encoding Ascii
-$env:GIT_CONFIG_GLOBAL = $gitCfg
-Ok "git URL redirect via GIT_CONFIG_GLOBAL=$gitCfg"
-
-# Isolated install target: the runner may carry a preinstalled hermes.
-# -HermesHome/-InstallDir are passed explicitly because the oldest sampled
-# installers predate the HERMES_HOME env override.
-$HermesHome = Join-Path $WorkRoot "hermes-home"
-$InstallDir = Join-Path $HermesHome "hermes-agent"
-New-Item -ItemType Directory -Path $HermesHome -Force | Out-Null
-$env:HERMES_HOME = $HermesHome
-# serve.git's file:// origin looks like a fork to the updater, whose "add
-# the official repo as upstream?" prompt would hang a headless run. This
-# marker is the product's own mechanism for suppressing it.
-Set-Content -LiteralPath (Join-Path $HermesHome ".skip_upstream_prompt") -Value "" -Encoding Ascii
-
-function Invoke-Installer {
- param([string]$Ref, [string]$Label, [switch]$IncludeDesktop)
- $script = Join-Path $WorkRoot "install-$Label.ps1"
- (Invoke-Git @("-C", $RepoRoot, "show", "$Ref`:scripts/install.ps1")) -join "`n" |
- Set-Content -LiteralPath $script -Encoding UTF8
- # Flags must match the installer being run, not this checkout's: older
- # releases reject parameters added later. -SkipSetup/-HermesHome/
- # -InstallDir go back further than any tag we sample; -NonInteractive
- # is probed from the ref's own script text.
- $flags = @("-SkipSetup", "-HermesHome", $HermesHome, "-InstallDir", $InstallDir)
- $text = Get-Content -LiteralPath $script -Raw
- if ($text -match '\$NonInteractive') { $flags += "-NonInteractive" }
- if ($IncludeDesktop) {
- # The desktop stage is the point of this leg, so a ref without the
- # parameter is a hard failure, not a silent downgrade to a plain
- # install. (Pre-desktop releases are already skipped upstream by
- # the tag-has-desktop gate; the parameter shipped with the app.)
- if ($text -notmatch '\$IncludeDesktop') {
- Fail "ref $Ref does not support -IncludeDesktop; this leg cannot mean what it claims"
- }
- $flags += "-IncludeDesktop"
- }
- $log = Join-Path $LogDir "install-$Label.log"
- # Native stderr (git clone progress, pip notices) must not become
- # terminating NativeCommandErrors under EAP=Stop; the exit code is the
- # verdict here, not stderr chatter.
- $prevEap = $ErrorActionPreference; $ErrorActionPreference = "Continue"
- & powershell -NoProfile -ExecutionPolicy Bypass -File $script @flags *> $log
- $installExit = $LASTEXITCODE
- $ErrorActionPreference = $prevEap
- Write-LogGroup "install.ps1 ($Label) transcript" $log
- if ($installExit -ne 0) {
- Fail "install.ps1 ($Label) exited $installExit; transcript above, log at $log"
- }
-}
-
-function Assert-Checkout {
- param([string]$ExpectedSha, [string]$Label)
- $got = (Invoke-Git @("-C", $InstallDir, "rev-parse", "HEAD")).Trim()
- if ($got -ne $ExpectedSha) { Fail "installed checkout is $got, expected $Label ($ExpectedSha)" }
- Ok "checkout is $Label ($ExpectedSha)"
- $hermes = Join-Path $InstallDir "venv\Scripts\hermes.exe"
- if (-not (Test-Path -LiteralPath $hermes)) { Fail "no hermes console script at $hermes" }
- $verLog = Join-Path $LogDir "version-$Label.log"
- $prevEap = $ErrorActionPreference; $ErrorActionPreference = "Continue"
- & $hermes --version *> $verLog
- $verExit = $LASTEXITCODE
- $ErrorActionPreference = $prevEap
- if ($verExit -ne 0) {
- Get-Content -LiteralPath $verLog | Write-Host
- Fail "hermes --version failed after $Label; log in $verLog"
- }
- Ok "hermes --version works: $((Get-Content -LiteralPath $verLog -First 1))"
-}
-
-function Assert-DesktopArtifact {
- param([string]$Label)
- # After a +desktop install the built app must exist under the checkout;
- # the installer also registers Start Menu / Desktop shortcuts, but the
- # artifact is the ground truth a headless job can check.
- $exe = Join-Path $InstallDir "apps\desktop\release\win-unpacked\Hermes.exe"
- if (-not (Test-Path -LiteralPath $exe)) {
- Fail "no desktop app at $exe after $Label (+desktop install)"
- }
- Ok "desktop app built by installer at ${Label}: $exe"
-}
-
-function Test-DesktopSmoke {
- param([string]$Label)
- # Prove the installed CLI can produce the desktop app: `hermes desktop
- # --build-only` runs the full desktop pipeline (workspace install,
- # renderer build, stamp write) and stops before the launch -- the same
- # call `hermes update` itself makes. Probe the INSTALLED hermes for the
- # flag rather than assuming this checkout's surface: sampled OLD
- # releases may predate `hermes desktop` or --build-only entirely, and
- # for them the phase skips, loudly.
- $hermes = Join-Path $InstallDir "venv\Scripts\hermes.exe"
- $prevEap = $ErrorActionPreference; $ErrorActionPreference = "Continue"
- $helpText = & $hermes desktop --help 2>&1 | Out-String
- $ErrorActionPreference = $prevEap
- if ($helpText -notmatch '--build-only') {
- Ok "hermes desktop --build-only not supported at $Label; skipping desktop smoke"
- return
- }
- $log = Join-Path $LogDir "desktop-smoke-$Label.log"
- $prevEap = $ErrorActionPreference; $ErrorActionPreference = "Continue"
- Push-Location $InstallDir
- try {
- & $hermes desktop --build-only *> $log
- $smokeExit = $LASTEXITCODE
- } finally {
- Pop-Location
- $ErrorActionPreference = $prevEap
- }
- Write-LogGroup "hermes desktop --build-only ($Label) transcript" $log
- if ($smokeExit -ne 0) {
- Fail "hermes desktop --build-only ($Label) exited $smokeExit; transcript above"
- }
- Ok "hermes desktop --build-only works at $Label"
- # TODO(launch): LAUNCH the built app and auto-close it. Mechanism when
- # the pieces land: driver-side spawn interception (a sitecustomize.py
- # on PYTHONPATH wraps subprocess.run under an env-var opt-in and
- # captures the real argv/cwd/env at the spawn site) + Playwright
- # _electron.launch on the captured spec; electronApp.close() is the
- # auto-close.
-}
-
-# --- install OLD ------------------------------------------------------------------
-
-Step "installing OLD ($InstallRef) via its own scripts/install.ps1 ($InstallMethod)"
-if ($InstallMethod -eq "installer-script+desktop") {
- Invoke-Installer $OldSha "old" -IncludeDesktop
- Assert-Checkout $OldSha "OLD"
- Assert-DesktopArtifact "OLD"
-} else {
- Invoke-Installer $OldSha "old"
- Assert-Checkout $OldSha "OLD"
-}
-Test-DesktopSmoke "old"
-
-# --- update OLD -> HEAD --------------------------------------------------------------
-
-Step "advancing served main to HEAD"
-Invoke-Git @("-C", $ServeRepo, "update-ref", "refs/heads/main", $HeadSha) | Out-Null
-Ok "serve.git main = $HeadSha"
-
-Step "updating via $UpdateMethod"
-switch ($UpdateMethod) {
- "hermes-update" {
- $hermes = Join-Path $InstallDir "venv\Scripts\hermes.exe"
- # `--yes` reaches the update subcommand only in later releases, and
- # argparse rejects the whole invocation when it does not exist.
- $updateArgs = @("update")
- $prevEap = $ErrorActionPreference; $ErrorActionPreference = "Continue"
- $helpText = & $hermes update --help 2>&1 | Out-String
- if ($helpText -match '--yes') { $updateArgs += "--yes" }
- $log = Join-Path $LogDir "update.log"
- Push-Location $InstallDir
- try {
- & $hermes @updateArgs *> $log
- $updateExit = $LASTEXITCODE
- } finally {
- Pop-Location
- $ErrorActionPreference = $prevEap
- }
- Write-LogGroup "hermes update transcript" $log
- if ($updateExit -ne 0) {
- Fail "hermes update exited $updateExit; transcript above, log at $log"
- }
- }
- "installer-script" {
- # A user re-running the one-liner today gets the CURRENT script.
- Invoke-Installer $HeadSha "head"
- }
- "installer-script+desktop" {
- Invoke-Installer $HeadSha "head" -IncludeDesktop
- Assert-DesktopArtifact "HEAD"
- }
-}
-Assert-Checkout $HeadSha "HEAD"
-Test-DesktopSmoke "head"
-
-Step "PASS: $InstallRef -> HEAD via $UpdateMethod"