Microsoft introduced the ability to install tools using the .NET Core CLI called Global Tools. This enables octo to conveniently
installed onto machine or build agent as long as you have the .NET Core
2.1.300 SDK available.
A local installation can be done into a specified location using the
dotnet tool install Octopus.DotNet.Cli --tool-path /path/for/tool --version <version>
This will install Octo into the specified location and generate a platform specific executable
dotnet-octo into the specified location. In order to enable
dotnet to be able to find
your custom tool location, you will need to add the tool location to the current environment path.
$env:PATH = "your\tool\folder;" + $env:PATH
Once the tool folder is in the path you can run octo commands using dotnet such as
dotnet octo pack
In order to install Octo for the current user you can do so by installing the tool globally using
dotnet tool install Octopus.DotNet.Cli --global --version 4.39.1
You may also omit the
--version parameter to install the latest version of the tools.
In order to update to the latest version of the tool you can use the
dotnet update command
dotnet tool update Octopus.DotNet.Cli --global
If you would like to update to a specific version or downgrade to an older version you can do so by first uninstalling the tool and installing it again.
dotnet tool uninstall Octopus.DotNet.Cli --global dotnet tool install Octopus.DotNet.Cli --global --version <version>