Skip to content

Latest commit

 

History

History
76 lines (51 loc) · 1.92 KB

README.md

File metadata and controls

76 lines (51 loc) · 1.92 KB

ib commands

dotnet tool ib

nuget.org/packages/ib provides Invoke-Build as the dotnet tool ib which may be installed as global or local. It may be used on any platform supporting PowerShell and dotnet.

Invoke-Build does not have to be installed separately, the tool contains it. But with just the tool you may miss some PowerShell features like argument completers, live error analysis, debugging, etc.

On the other hand, the tool is more convenient than the PowerShell module in shell invocation scenarios, for example in build event commands in various MSBuild project files.

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

Usage

The following commands and options are supported:

- Show this help
  ib -h|--help

- Show command help
  ib -h|--help task|exec|assert|...

- Show Invoke-Build help
  ib -?
  ib /?

- Call Invoke-Build with arguments
  ib [--pwsh] [arguments]

    --pwsh
      On Windows tells to run by pwsh (the default is powershell).
      On other platforms pwsh is used and required in any case.

    If the environment variable pwsh is defined it is used as pwsh.

shell script ib

Alternatively, you may use the following helper scripts:

Unlike with the tool ib, Invoke-Build has to be installed, either as the module in a standard location or as scripts with the directory added to the path.

If the environment variable pwsh is defined it is used as pwsh by ib.cmd. Otherwise, ib.cmd uses powershell.

PowerShell alias ib

For similar experience in PowerShell interactive consoles you may add the alias ib in your profile. Examples:

# installed as module
Set-Alias ib Invoke-Build

# installed as scripts
Set-Alias ib .../Invoke-Build.ps1