diff --git a/scripts/install.ps1 b/scripts/install.ps1 index 901b8bf..a02b5c5 100644 --- a/scripts/install.ps1 +++ b/scripts/install.ps1 @@ -10,6 +10,7 @@ $root = Split-Path $PSScriptRoot -Parent . (Join-Path $PSScriptRoot 'lib/plugins.ps1') . (Join-Path $PSScriptRoot 'lib/manifest.ps1') . (Join-Path $PSScriptRoot 'lib/install-targets.ps1') +. (Join-Path $PSScriptRoot 'lib/selection-state.ps1') $Platform = Read-InstallPlatform -Platform $Platform $platform = $Platform.ToLowerInvariant() @@ -38,5 +39,6 @@ foreach ($item in (Get-InstallTargets -Generated $generated -HomePath $homePath $plugins = Select-ConfiguredPlugins -RepositoryRoot $root -Client $Client -Mode 'Install' -DryRun:$DryRun Install-ConfiguredPlugins -RepositoryRoot $root -Client $Client -DryRun:$DryRun -Summary:$Summary -Entries $plugins.Selected +if (-not $DryRun) { Save-UpdateSelection -HomePath $homePath -RepositoryRoot $root -Platform $Platform -Client $Client -Plugins $plugins } if ($Summary) { Write-Output "Install: PASS | $Client, $Platform$(if ($DryRun) { ', dry-run' })" } else { Write-Output ($(if ($DryRun) { 'PASS install dry-run' } else { 'PASS install' })) } exit 0 diff --git a/scripts/install.sh b/scripts/install.sh index cdc1a1d..782e1be 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -19,6 +19,7 @@ root=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd) . "$root/scripts/lib/plugins.sh" . "$root/scripts/lib/manifest.sh" . "$root/scripts/lib/install-targets.sh" +. "$root/scripts/lib/selection-state.sh" platform=$(read_install_platform "$platform") client=$(read_install_client "$client") @@ -52,6 +53,7 @@ selected_plugins=() deselected_plugins=() select_configured_plugins "$root" "$client" Install "$dry_run" selected_plugins deselected_plugins install_configured_plugins "$root" "$client" "$dry_run" false selected_plugins "$summary" +if [ "$dry_run" = false ]; then save_update_selection; fi if [ "$summary" = true ]; then suffix=