OneBuild - Convention based PowerShell build for .NET
OneBuild is a modular set of convention based .NET solution build scripts written in PowerShell, relying on Invoke-Build for task automation. See https://github.com/lholman/OneBuild for more details.
OneBuild is shipped as a solution NuGet package, use it to build your solution by installing the NuGet package..
PS>Install-Package OneBuild
Then simply run..
C:\>cd "Path to your solution"
C:\Path to your solution\>OneBuild.bat
NuGet installs OneBuild and its dependencies in your $SolutionDir\Packages folder, copying the OneBuild.bat
bootstrap script to the root of the $SolutionDir
OneBuild is a modular set of .NET solution build scripts written in PowerShell. Following the proven Deployment Pipeline approach to software build and delivery, OneBuild makes the Commit phase (versioning, compilation, unit testing and packaging of binaries) of a Deployment Pipeline a repeatable, deterministic and simple exercise. Being convention based and therefore requiring no configuration allows OneBuild to build any target .NET solution out of the box, assuming the solution follows some basic convention patterns. OneBuild is proud to rely on Invoke-Build for task automation.
Using standard Powershell and Invoke-Build script parameters you can pass in values for the following.
-task
- Optional. The name of the Invoke-Build task to execute, defaults to Invoke-Commit.-configuration
- Optional. The .NET build configuration, Debug
or Release
, defaults to Debug
.-buildcounter
- Optional. The incrementing build counter often used within CI servers, generally forming the third part of a four part version number ([major].[minor].[buildCounter].[revision]), defaults to 999
.Much of the logic within each phase of the build pipeline relies heavily on convention, thus no configuration. Adhere to the documented convention and OneBuild should just work.
Note: The OneBuild OneBuild.bat
bootstrap script and Invoke-Build OneBuild.build.ps1
build script must sit alongside the Visual Studio solution file(s) you intend to build. If you install with NuGet these are copied for you when executing PM> Install-Package Nunit
There are a number of benefits of having a build process that can be run in its entirety on a local (developers) machine. I've written more about this before, but here's a summary.