Skip to content

Commit

Permalink
add spm backend doc
Browse files Browse the repository at this point in the history
  • Loading branch information
kattouf committed Jun 4, 2024
1 parent 6a3f377 commit 1c9427d
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/dev-tools/backends/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ In addition to asdf plugins, you can also directly install CLIs with some packag
* [Go](/dev-tools/backends/go) <Badge type="warning" text="experimental" />
* [NPM](/dev-tools/backends/npm) <Badge type="warning" text="experimental" />
* [Pipx](/dev-tools/backends/pipx) <Badge type="warning" text="experimental" />
* [SPM](/dev-tools/backends/spm) <Badge type="warning" text="experimental" />
* [Ubi](/dev-tools/backends/ubi) <Badge type="warning" text="experimental" />
* [More coming soon!](https://github.com/jdx/mise/discussions/1250)

Expand Down
41 changes: 41 additions & 0 deletions docs/dev-tools/backends/spm.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# SPM Backend <Badge type="warning" text="experimental" />

You may install executables managed by [Swift Package Manager](https://www.swift.org/documentation/package-manager) directly from Github releases.

The code for this is inside of the mise repository at [`./src/backend/spm.rs`](https://github.com/jdx/mise/blob/main/src/backend/spm.rs).

## Dependencies

This relies on having `swift` installed. You can install it according to the [instructions](https://www.swift.org/install).

## Usage

The following installs the latest version of `tuist`
and sets it as the active version on PATH:

```sh
$ mise use -g spm:tuist/tuist
$ tuist --help
OVERVIEW: Generate, build and test your Xcode projects.

USAGE: tuist <subcommand>
...
```

The version will be set in `~/.config/mise/config.toml` with the following format:

```toml
[tools]
"spm:tuist/tuist" = "latest"
```

### Supported Ubi Syntax

| Description | Usage |
| --------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
| Github shorthand for latest release version | `spm:tuist/tuist` |
| Github shorthand for specific release version | `spm:tuist/[email protected]` |
| Github url for latest release version | `spm:https://github.com/tuist/tuist.git` |
| Github url for specific release version | `spm:https://github.com/tuist/[email protected]` |

Other syntax may work but is unsupported and untested.

0 comments on commit 1c9427d

Please sign in to comment.