• Stars
    star
    638
  • Rank 70,537 (Top 2 %)
  • Language
    PowerShell
  • License
    Apache License 2.0
  • Created over 13 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Build Automation in PowerShell

PSGVPSGD NuGet

Build Automation in PowerShell

Invoke-Build is a build and test automation tool which invokes tasks defined in PowerShell v2.0+ scripts. It is similar to psake but arguably easier to use and more powerful. It is complete, bug free, well covered by tests.

In addition to basic task processing the engine supports

  • Incremental tasks with effectively processed inputs and outputs.
  • Persistent builds which can be resumed after interruptions.
  • Parallel builds in separate workspaces with common stats.
  • Batch invocation of tests composed as tasks.
  • Ability to define new classes of tasks.

Invoke-Build v3.0.1+ is cross-platform with PowerShell Core.

Invoke-Build can be effectively used in VSCode and ISE.

Several PowerShell Team projects use Invoke-Build.

The package

The package includes the engine, helpers, and help:

Extra scripts, see PSGallery and the repository:

And some more tools, see the repository:

Install as module

Invoke-Build is published as PSGallery module InvokeBuild. You can install it by one of these commands:

Install-Module InvokeBuild

To install the module with Chocolatey, run the following command:

choco install invoke-build

NOTE: The Chocolatey package is maintained by its owner.

Install as scripts

Invoke-Build is also published as nuget.org/packages/Invoke-Build.

If you use scoop then invoke:

scoop install invoke-build

and you are done, scripts are downloaded and their directory is added to the path. You may need to start a new PowerShell session with the updated path.

Otherwise, download the package manually, rename it to zip, extract its tools and rename to InvokeBuild. Consider including this directory to the path for invoking scripts by names. Or copy to any PowerShell module directory in order to use it as module.

Install as dotnet tool

nuget.org/packages/ib provides Invoke-Build as the dotnet tool ib which may be installed as global or local.

To install the global tool:

dotnet tool install --global ib

To install the local tool:

dotnet new tool-manifest # once on setting up a repo with tools
dotnet tool install --local ib

See ib/README for more details about ib commands.

Getting help

If you are using the module (known issue #2899) or the script is not in the path then use the full path to Invoke-Build.ps1 instead of Invoke-Build in the below commands:

In order to get help for the engine, invoke:

help Invoke-Build -full

In order to get help for internal commands:

. Invoke-Build
help task -full
help exec -full
...

Online resources

Questions, suggestions, and reports are welcome at discussions and issues. Or just hit me up on Twitter @romkuzmin

Credits

More Repositories

1

PowerShellTraps

Collection of PowerShell traps and oddities
PowerShell
432
star
2

Mdbc

MongoDB Cmdlets for PowerShell
PowerShell
139
star
3

FarNet

Far Manager framework for .NET modules and scripts in PowerShell, F#, JavaScript.
C#
134
star
4

SplitPipeline

Parallel Data Processing in PowerShell
PowerShell
124
star
5

PowerShelf

PowerShell Script Tools
PowerShell
118
star
6

Helps

PowerShell Help Builder
PowerShell
43
star
7

PS-GuiCompletion

A graphical menu for PowerShell tab completions.
PowerShell
42
star
8

PsdKit

PowerShell data (psd1) tool kit
PowerShell
42
star
9

Ldbc

LiteDB Cmdlets, the document store in PowerShell
PowerShell
40
star
10

FarNet.FSharp.PowerShell

F# friendly PowerShell Core helper
F#
20
star
11

Xmlips

XML in PowerShell
PowerShell
14
star
12

Invoke-Build.template

Invoke-Build script template
PowerShell
5
star
13

BsonFile

BSON/JSON file collections in MongoDB, PowerShell module
PowerShell
5
star
14

FarLite

PowerShell module with LiteDB browser in Far Manager
PowerShell
3
star
15

FarDescription

Far Manager style descriptions of files and directories
C#
3
star
16

ClearScript

ClearScript and FarNet lab for Far Manager scripting in JavaScript
PowerShell
2
star
17

FarMongo

PowerShell module with MongoDB browser in Far Manager
PowerShell
2
star
18

FarGit

Deprecated and replaced by https://github.com/nightroman/FarNet/tree/main/GitKit
PowerShell
1
star
19

FarNet.FSharp.Data

FSharp.Data package for FarNet.FSharpFar
PowerShell
1
star
20

FarNet.FSharp.Charting

FarNet friendly FSharp.Charting extension
F#
1
star
21

FarNet.template

FarNet module and script template
PowerShell
1
star
22

FarNet.Redis

StackExchange.Redis PowerShell module and FarNet library
C#
1
star
23

FarNet.Stateless

Interactive workflows using dotnet-state-machine/stateless, PowerShell module and FarNet library
C#
1
star