diff --git a/scripts/install.ps1 b/scripts/install.ps1 index eba224e..901b8bf 100644 --- a/scripts/install.ps1 +++ b/scripts/install.ps1 @@ -21,7 +21,7 @@ if (-not $DryRun -and (Test-AnyManifestPresent (Get-InstallDestinations -HomePat } $buildScript = Join-Path $PSScriptRoot 'build.ps1' -& $buildScript +& $buildScript -Summary:$Summary if (-not $?) { throw 'Build failed. Installation was not started.' } $generated = Join-Path $root 'generated' if (-not (Test-Path $generated)) { throw 'Generated output is missing after a successful build.' } @@ -38,5 +38,5 @@ 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 -Write-Output ($(if ($DryRun) { 'PASS install dry-run' } else { 'PASS install' })) +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 f806e00..cdc1a1d 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -32,7 +32,9 @@ if [ "$dry_run" = false ]; then fi fi -bash "$root/scripts/build.sh" +build_args=() +[ "$summary" = false ] || build_args+=(--summary) +bash "$root/scripts/build.sh" "${build_args[@]}" generated="$root/generated" [ -d "$generated" ] || { printf 'Generated output is missing after a successful build.\n' >&2; exit 1; } @@ -51,4 +53,8 @@ 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"; then printf 'PASS install dry-run\n'; else printf 'PASS install\n'; fi +if [ "$summary" = true ]; then + suffix= + [ "$dry_run" = false ] || suffix=', dry-run' + printf 'Install: PASS | %s, %s%s\n' "$client" "$platform" "$suffix" +elif "$dry_run"; then printf 'PASS install dry-run\n'; else printf 'PASS install\n'; fi diff --git a/scripts/update.ps1 b/scripts/update.ps1 index 868bceb..61a8f22 100644 --- a/scripts/update.ps1 +++ b/scripts/update.ps1 @@ -21,7 +21,7 @@ if (-not $DryRun -and -not (Test-AllManifestsPresent (Get-InstallDestinations -H } $buildScript = Join-Path $PSScriptRoot 'build.ps1' -& $buildScript +& $buildScript -Summary:$Summary if (-not $?) { throw 'Build failed. Update was not started.' } $generated = Join-Path $root 'generated' if (-not (Test-Path $generated)) { throw 'Generated output is missing after a successful build.' } @@ -39,5 +39,5 @@ foreach ($item in (Get-InstallTargets -Generated $generated -HomePath $homePath $plugins = Select-ConfiguredPlugins -RepositoryRoot $root -Client $Client -Mode 'Update' -DryRun:$DryRun Install-ConfiguredPlugins -RepositoryRoot $root -Client $Client -DryRun:$DryRun -Update -Summary:$Summary -Entries $plugins.Selected Uninstall-DeselectedPlugins -Entries $plugins.Deselected -Client $Client -DryRun:$DryRun -Summary:$Summary -Write-Output ($(if ($DryRun) { 'PASS update dry-run' } else { 'PASS update' })) +if ($Summary) { Write-Output "Update: PASS | $Client, $Platform$(if ($DryRun) { ', dry-run' })" } else { Write-Output ($(if ($DryRun) { 'PASS update dry-run' } else { 'PASS update' })) } exit 0 diff --git a/scripts/update.sh b/scripts/update.sh index 566ce41..18f4d41 100644 --- a/scripts/update.sh +++ b/scripts/update.sh @@ -32,7 +32,9 @@ if [ "$dry_run" = false ]; then fi fi -bash "$root/scripts/build.sh" +build_args=() +[ "$summary" = false ] || build_args+=(--summary) +bash "$root/scripts/build.sh" "${build_args[@]}" generated="$root/generated" [ -d "$generated" ] || { printf 'Generated output is missing after a successful build.\n' >&2; exit 1; } @@ -52,4 +54,8 @@ select_configured_plugins "$root" "$client" Update "$dry_run" selected_plugins d install_configured_plugins "$root" "$client" "$dry_run" true selected_plugins "$summary" uninstall_deselected_plugins "$root" "$client" "$dry_run" deselected_plugins "$summary" -if "$dry_run"; then printf 'PASS update dry-run\n'; else printf 'PASS update\n'; fi +if [ "$summary" = true ]; then + suffix= + [ "$dry_run" = false ] || suffix=', dry-run' + printf 'Update: PASS | %s, %s%s\n' "$client" "$platform" "$suffix" +elif "$dry_run"; then printf 'PASS update dry-run\n'; else printf 'PASS update\n'; fi