Distribution
Distribution describes how operators will install Dispatch once the v1 package surfaces are implemented.
Status: Roadmap 8 local/source/ZIP packaging implemented. Enterprise distribution remains Roadmap 13.
Current support: packaging/build-module.ps1 assembles a local PowerShell module folder with a bundled self-contained win-x64 dispatch.exe at bin\win-x64\dispatch.exe, copies the package installer into the module root, validates the module manifest, imports the assembled module, verifies Get-DispatchVersion through the bundled executable, and can create a validated release ZIP with -CreateZip.
packaging/install.ps1 installs an already assembled package into a CurrentUser or AllUsers PowerShell module scope, adds the installed bin\win-x64 folder to PATH for direct dispatch invocation, and validates the installed manifest, bundled executable, module import, exported commands, Get-DispatchVersion, and dispatch --help through PATH.
packaging/install-from-source.ps1 prints install phases to the terminal, checks Git and the .NET 8 SDK before building, builds and installs from an existing checkout or clones the GitHub repository for the irm | iex flow, replaces the same installed module version when rerun, then validates the installed module, bundled executable, exported commands, and dispatch --help. After successful validation from a temporary checkout, it schedules an external cleanup helper from the temp folder and reports cleanup status without treating cleanup scheduling failure as an installation failure.
Module Assembly
Build the current module package from an existing checkout:
.\packaging\build-module.ps1
The default output is:
artifacts\module\Dispatch\
Dispatch.psd1
Dispatch.psm1
install.ps1
bin\win-x64\dispatch.exe
Use -Configuration Debug|Release, -Runtime win-x64, -OutputPath <path>, and -NoRestore when needed for local validation or CI.
Source Install
Primary v1 flow:
irm https://raw.githubusercontent.com/Kmac907/Dispatch/main/packaging/install-from-source.ps1 | iex
The installer:
- Prints each install phase to the terminal.
- Checks prerequisites, including Git when a temporary checkout is needed and the .NET 8 SDK for source builds.
- Creates a temporary checkout when it is not run from an existing source tree.
- Builds the self-contained
win-x64executable. - Assembles the PowerShell module.
- Installs or replaces the module and bundled executable for the selected version.
- Adds the bundled executable folder to PATH unless
-NoPathUpdateis supplied or-DestinationRootis used for validation. - Validates direct
dispatch --help,dispatch version, module import, and exported commands. - Schedules an external cleanup helper from the temp folder after successful validation unless
-NoCleanupis supplied.
The installer returns Cleanup, CleanupHelperPath, CleanupStatusPath, and CleanupError fields. A cleanup scheduling failure is reported in those fields, but it does not remove the already validated module or turn the successful install into a failed install.
The primary irm command is rerunnable. If the same Dispatch module version is already installed, the source installer replaces it, validates the replacement, and only reports success after validation passes.
Source install requires the .NET 8 SDK because it builds Dispatch before installing it. If only the .NET runtime is installed, the installer fails early with a prerequisite message instead of failing later during dotnet publish.
After install, operators can run dispatch directly from PATH and call wrapper commands such as Test-Dispatch or Get-DispatchVersion directly from PowerShell. PowerShell normally auto-loads the installed module for those wrapper commands; explicit Import-Module Dispatch -Force is only a reload or troubleshooting step.
Existing Checkout
Developer/troubleshooting mode:
.\packaging\install-from-source.ps1 -NoCleanup
Use -SourceRoot <path> to build from a specific checkout, -DestinationRoot <path> for CI/local validation without touching real module paths or PATH, -NoPathUpdate to skip PATH changes on a real install, and -NoRestore when dependencies are already restored. Source installs replace the same installed module version by default so the documented irm command can be used for install, repair, and update.
Packaged Install
Install an already assembled package:
.\packaging\install.ps1 -Scope CurrentUser
.\packaging\install.ps1 -Scope AllUsers
CurrentUser installs into the current shell family's per-user module path and updates the current user's PATH. AllUsers installs into the current shell family's machine module path, updates machine PATH, and requires an elevated shell. Use -ModulePath <path> to install a package outside the default artifacts\module\Dispatch location, -Force to replace the same installed module version, -NoPathUpdate to skip PATH changes, and -DestinationRoot <path> only for CI or local validation where the real PowerShell module paths and PATH should not be touched.
Optional ZIP
Create the optional release convenience artifact from the same build script:
.\packaging\build-module.ps1 -CreateZip
The ZIP is written under artifacts\packages\ with the module manifest version and runtime in the file name, for example:
artifacts\packages\Dispatch-0.1.0-win-x64.zip
The ZIP has one installable root:
Dispatch\
Dispatch.psd1
Dispatch.psm1
install.ps1
bin\win-x64\dispatch.exe
The build script creates this package from a clean staging folder. Source files, tests, .git, .codex, workflow files, intermediate bin / obj, and publish-only output are not included.
When -CreateZip is used, the script extracts the ZIP to a temporary folder, runs the extracted Dispatch\install.ps1 into a temporary module root, imports the installed module, verifies exported commands and Get-DispatchVersion, and checks the bundled dispatch.exe --help before returning success.
Use -PackageOutputPath <path> to place the ZIP somewhere other than artifacts\packages. CI/CD can upload the generated ZIP to GitHub Releases, but release upload remains outside the local build script.
Not V1
- MSI installer.
- WinGet package.
- Azure Artifacts feed.
- Public PowerShell Gallery publishing.