diff --git a/README.md b/README.md index 532cd94..6333508 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,8 @@ Open **Windows PowerShell** as your normal desktop user and paste: irm 'https://proxy.dandaedre.com/gitea/Beffroi/config-central/raw/branch/main/install.ps1' | iex ``` -Setup selects the matching machine profile or asks you to choose one. It installs +The bundled machine profile is `beffroi-laptop`, selected automatically. If you +add more machines, setup matches the computer name or asks you to choose one. It installs Git, PowerShell 7, and the declared software, then applies the configs. Approve administrator prompts when needed. Rerun this command to repair setup. diff --git a/TASKS.md b/TASKS.md index 5542fc8..eae7f47 100644 --- a/TASKS.md +++ b/TASKS.md @@ -123,3 +123,4 @@ open until it is run on disposable machines with the required account setups. - [x] Simplify the README around setup and web config updates; move detailed CLI workflows into an advanced guide. - [x] Preserve signed WinGet HRESULT bits without UInt32 overflow and test diagnostic capture. +- [x] Rename the bundled default machine to beffroi-laptop and document switching existing setups. diff --git a/docs/advanced_commands.md b/docs/advanced_commands.md index 9888bd6..7eaedf4 100644 --- a/docs/advanced_commands.md +++ b/docs/advanced_commands.md @@ -37,7 +37,7 @@ removed afterward. For unattended installation, select the machine in the same command: ```powershell -$env:CONFIG_CENTRAL_MACHINE = 'example-desktop'; irm 'https://proxy.dandaedre.com/gitea/Beffroi/config-central/raw/branch/main/install.ps1' | iex +$env:CONFIG_CENTRAL_MACHINE = 'beffroi-laptop'; irm 'https://proxy.dandaedre.com/gitea/Beffroi/config-central/raw/branch/main/install.ps1' | iex ``` The installer is safe to rerun for repair or setup updates. Use the web updater @@ -50,7 +50,7 @@ then run it from Windows PowerShell: powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\bootstrap.ps1 ` -Repository 'https://your-server/you/config-central.git' ` -Branch main ` - -Machine example-desktop + -Machine beffroi-laptop ``` The underlying bootstrap repairs WinGet if necessary, installs Git and @@ -73,6 +73,16 @@ cc plan cc apply ``` +### Switching an existing example-desktop setup + +After pulling this change, rerun the web installer once to replace the saved +`example-desktop` selection with `beffroi-laptop`. To refresh setup without +deploying configs or packages: + +```powershell +& ([scriptblock]::Create((irm 'https://proxy.dandaedre.com/gitea/Beffroi/config-central/raw/branch/main/install.ps1'))) -Machine beffroi-laptop -SkipApply +``` + ## Web config updater After setup, run this in Windows PowerShell or PowerShell 7: diff --git a/machines/example-desktop.json b/machines/beffroi-laptop.json similarity index 84% rename from machines/example-desktop.json rename to machines/beffroi-laptop.json index fa2be97..1eb5469 100644 --- a/machines/example-desktop.json +++ b/machines/beffroi-laptop.json @@ -1,7 +1,7 @@ { "$schema": "../schemas/machine.schema.json", "schemaVersion": 1, - "name": "example-desktop", + "name": "beffroi-laptop", "profiles": ["base", "development", "desktop-apps"], "packages": [], "configs": [] diff --git a/tests/Installer.Tests.ps1 b/tests/Installer.Tests.ps1 index 859766e..ed98119 100644 --- a/tests/Installer.Tests.ps1 +++ b/tests/Installer.Tests.ps1 @@ -36,8 +36,8 @@ Describe 'One-stop installer machine selection' { } It 'automatically selects the only available manifest' { - Select-ConfigCentralMachine -Requested '' -Saved '' -Available @('example-desktop') | - Should -Be 'example-desktop' + Select-ConfigCentralMachine -Requested '' -Saved '' -Available @('beffroi-laptop') | + Should -Be 'beffroi-laptop' } It 'allows unset environment defaults through parameter binding' { diff --git a/tests/Manifest.Tests.ps1 b/tests/Manifest.Tests.ps1 index 94d9329..29d4df4 100644 --- a/tests/Manifest.Tests.ps1 +++ b/tests/Manifest.Tests.ps1 @@ -4,7 +4,7 @@ BeforeAll { Describe 'Manifest resolution' { It 'resolves the checked-in example in profile order' { - $result = Resolve-MachineManifest -RepositoryRoot "$PSScriptRoot/.." -Machine 'example-desktop' + $result = Resolve-MachineManifest -RepositoryRoot "$PSScriptRoot/.." -Machine 'beffroi-laptop' $result.packages.Count | Should -Be 13 $result.configs.Count | Should -Be 7 $result.packages[0].id | Should -Be 'Git.Git' diff --git a/tests/Windows.Integration.Tests.ps1 b/tests/Windows.Integration.Tests.ps1 index fb9f0f4..89b90ee 100644 --- a/tests/Windows.Integration.Tests.ps1 +++ b/tests/Windows.Integration.Tests.ps1 @@ -2,15 +2,15 @@ $runIntegration = $IsWindows -and $env:CONFIG_CENTRAL_INTEGRATION -eq '1' Describe 'Disposable Windows integration' -Skip:(-not $runIntegration) { It 'passes doctor on the Windows worker' { - & "$PSScriptRoot/../cc.ps1" doctor -Machine example-desktop -Json + & "$PSScriptRoot/../cc.ps1" doctor -Machine beffroi-laptop -Json $LASTEXITCODE | Should -Be 0 } It 'performs two config-only applies idempotently' { $data = Join-Path $TestDrive 'integration-data' - & "$PSScriptRoot/../cc.ps1" apply -Machine example-desktop -ConfigsOnly -ForceConfigs -DataRoot $data -Json + & "$PSScriptRoot/../cc.ps1" apply -Machine beffroi-laptop -ConfigsOnly -ForceConfigs -DataRoot $data -Json $LASTEXITCODE | Should -Be 0 - $second = & "$PSScriptRoot/../cc.ps1" apply -Machine example-desktop -ConfigsOnly -DataRoot $data -Json | ConvertFrom-Json + $second = & "$PSScriptRoot/../cc.ps1" apply -Machine beffroi-laptop -ConfigsOnly -DataRoot $data -Json | ConvertFrom-Json $LASTEXITCODE | Should -Be 0 @($second.operations | Where-Object status -eq 'Unchanged').Count | Should -BeGreaterThan 0 }