Objective
Create a repository-root build.ps1 script with parameter sets to standardize Build, Test, and Pack workflows across Roslyn variants.
Scope
- Implement
Build (default), Test, and Pack parameter sets.
- Ensure script is directory-independent (
Push-Location $PSScriptRoot / Pop-Location in finally).
- Use strict error handling and propagate non-zero exit codes.
Files
Tasks
Acceptance Criteria
Dependencies
Notes
- Assume
dotnet tool restore has already been run so dotnet pwsh is available.
Objective
Create a repository-root
build.ps1script with parameter sets to standardize Build, Test, and Pack workflows across Roslyn variants.Scope
Build(default),Test, andPackparameter sets.Push-Location $PSScriptRoot/Pop-Locationinfinally).Files
build.ps1Tasks
Build(default) with-Configuration(defaultRelease)Testwith-Configurationand-NoBuildPackwith-Configurationand optional-VersionSuffixdotnet buildsolution baseline.dotnet build src/DocoptNet/DocoptNet.csproj -f netstandard2.0 -p:RoslynVersion=4.4.-NoBuildis not set.dotnet test --no-buildwhen applicable.-p:RoslynVersion=4.4.dotnet pack src/DocoptNet/DocoptNet.csproj --no-build.--version-suffixonly when provided.$ErrorActionPreference = 'Stop'and fail fast on$LASTEXITCODE.Acceptance Criteria
dotnet pwsh ./build.ps1completes baseline + Roslyn 4.4 build.dotnet pwsh ./build.ps1 -Testruns test pass for both variants.dotnet pwsh ./build.ps1 -Packsucceeds and returns non-zero on failures.Dependencies
Notes
dotnet tool restorehas already been run sodotnet pwshis available.