feat(install): add compact install and update summaries
This commit is contained in:
1 parent
5b50f32f4b
commit
545c9841b2
4 files changed
+20
-8
No files matched your search
+2
-2
@@ -21,7 +21,7 @@ if (-not $DryRun -and (Test-AnyManifestPresent (Get-InstallDestinations -HomePat
|
|||||||
}
|
}
|
||||||
|
|
||||||
$buildScript = Join-Path $PSScriptRoot 'build.ps1'
|
$buildScript = Join-Path $PSScriptRoot 'build.ps1'
|
||||||
& $buildScript
|
& $buildScript -Summary:$Summary
|
||||||
if (-not $?) { throw 'Build failed. Installation was not started.' }
|
if (-not $?) { throw 'Build failed. Installation was not started.' }
|
||||||
$generated = Join-Path $root 'generated'
|
$generated = Join-Path $root 'generated'
|
||||||
if (-not (Test-Path $generated)) { throw 'Generated output is missing after a successful build.' }
|
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
|
$plugins = Select-ConfiguredPlugins -RepositoryRoot $root -Client $Client -Mode 'Install' -DryRun:$DryRun
|
||||||
Install-ConfiguredPlugins -RepositoryRoot $root -Client $Client -DryRun:$DryRun -Summary:$Summary -Entries $plugins.Selected
|
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
|
exit 0
|
||||||
+8
-2
@@ -32,7 +32,9 @@ if [ "$dry_run" = false ]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
bash "$root/scripts/build.sh"
|
build_args=()
|
||||||
|
[ "$summary" = false ] || build_args+=(--summary)
|
||||||
|
bash "$root/scripts/build.sh" "${build_args[@]}"
|
||||||
generated="$root/generated"
|
generated="$root/generated"
|
||||||
[ -d "$generated" ] || { printf 'Generated output is missing after a successful build.\n' >&2; exit 1; }
|
[ -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
|
select_configured_plugins "$root" "$client" Install "$dry_run" selected_plugins deselected_plugins
|
||||||
install_configured_plugins "$root" "$client" "$dry_run" false selected_plugins "$summary"
|
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
|
||||||
+2
-2
@@ -21,7 +21,7 @@ if (-not $DryRun -and -not (Test-AllManifestsPresent (Get-InstallDestinations -H
|
|||||||
}
|
}
|
||||||
|
|
||||||
$buildScript = Join-Path $PSScriptRoot 'build.ps1'
|
$buildScript = Join-Path $PSScriptRoot 'build.ps1'
|
||||||
& $buildScript
|
& $buildScript -Summary:$Summary
|
||||||
if (-not $?) { throw 'Build failed. Update was not started.' }
|
if (-not $?) { throw 'Build failed. Update was not started.' }
|
||||||
$generated = Join-Path $root 'generated'
|
$generated = Join-Path $root 'generated'
|
||||||
if (-not (Test-Path $generated)) { throw 'Generated output is missing after a successful build.' }
|
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
|
$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
|
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
|
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
|
exit 0
|
||||||
+8
-2
@@ -32,7 +32,9 @@ if [ "$dry_run" = false ]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
bash "$root/scripts/build.sh"
|
build_args=()
|
||||||
|
[ "$summary" = false ] || build_args+=(--summary)
|
||||||
|
bash "$root/scripts/build.sh" "${build_args[@]}"
|
||||||
generated="$root/generated"
|
generated="$root/generated"
|
||||||
[ -d "$generated" ] || { printf 'Generated output is missing after a successful build.\n' >&2; exit 1; }
|
[ -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"
|
install_configured_plugins "$root" "$client" "$dry_run" true selected_plugins "$summary"
|
||||||
uninstall_deselected_plugins "$root" "$client" "$dry_run" deselected_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
|
||||||
Reference in new issue
Block a user