toolprovider

package
v2.40.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 22, 2026 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertToEnvMap added in v2.36.0

func ConvertToEnvMap(activations []provider.EnvironmentActivation) map[string]string

func ConvertToEnvmanEnvs added in v2.36.0

func ConvertToEnvmanEnvs(activations []provider.EnvironmentActivation) []envmanModels.EnvironmentItemModel

func CreateProvider added in v2.40.0

func CreateProvider(providerID string, useFastInstall bool, silent bool, extraEnvs map[string]string) (provider.ToolProvider, error)

CreateProvider constructs and bootstraps a ToolProvider for the given provider ID. extraEnvs are additional environment variables passed to the provider (e.g. GitHub tokens). Pass nil for extraEnvs when running as a CLI subcommand from a user's shell.

func DefaultFastInstall added in v2.39.4

func DefaultFastInstall() bool

func GetLatestVersion added in v2.37.0

func GetLatestVersion(toolRequest provider.ToolRequest, providerID string, useFastInstall bool, silent bool) (string, error)

GetLatestVersion queries the latest version of a tool without installing it (installed or released). Supports both mise and asdf providers.

func InstallSingleTool added in v2.36.1

func InstallSingleTool(toolRequest provider.ToolRequest, providerID string, useFastInstall bool, tracker analytics.Tracker, silent bool) ([]provider.EnvironmentActivation, error)

InstallSingleTool installs a single tool with the specified version using the given provider.

func ListToolVersions added in v2.40.0

func ListToolVersions(toolName string, versionPrefix string, tp provider.ToolProvider) ([]string, error)

ListToolVersions resolves aliases, validates the tool name against SupportedTools, and returns all released versions sorted newest-first. If versionPrefix is non-empty, only versions starting with that prefix are returned.

func ParseVersionString

func ParseVersionString(versionString string) (string, provider.ResolutionStrategy, error)

ParseVersionString takes a string like `3.12:latest` and parses it into a plain version string (3.12) and a ResolutionStrategy (latest released).

func RunDeclarativeSetup added in v2.36.0

func RunDeclarativeSetup(config models.BitriseDataModel, tracker analytics.Tracker, isCI bool, workflowID string, silent bool, providerOverride *string, fastInstallOverride *bool, envs map[string]string) ([]provider.EnvironmentActivation, error)

func RunVersionFileSetup added in v2.36.0

func RunVersionFileSetup(versionFilePaths []string, tracker analytics.Tracker, silent bool, providerOverride *string, fastInstallOverride *bool) ([]provider.EnvironmentActivation, error)

RunVersionFileSetup installs tools from version files.

func SupportedTools added in v2.40.0

func SupportedTools() []string

SupportedTools returns the list of tools the CLI advertises and accepts for the "versions" and "list-tools" commands. Uses canonical names (e.g. "golang" not "go", "nodejs" not "node"). It is predominantly composed of mise core tools, but can include others, such as flutter.

Types

type InstalledTool added in v2.36.3

type InstalledTool struct {
	Name              string   `json:"name"`
	InstalledVersions []string `json:"installed_versions,omitempty"`
	ActiveVersion     string   `json:"active_version,omitempty"`
	Source            string   `json:"source,omitempty"`
}

InstalledTool represents an installed tool with its versions.

func ListInstalledTools added in v2.36.3

func ListInstalledTools(providerName string, activeOnly, silent bool) ([]InstalledTool, error)

ListInstalledTools lists all tools installed by the configured provider. If activeOnly is true, only tools that are currently active in the shell context are returned.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL