Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add SPM backend page #2252

Merged
merged 5 commits into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/dev-tools/backends/cargo.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
You may install packages directly from [Cargo Crates](https://crates.io/) even if there
isn't an asdf plugin for it.

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

## Dependencies

Expand Down
2 changes: 1 addition & 1 deletion docs/dev-tools/backends/go.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
You may install packages directly via [go install](https://go.dev/doc/install) even if there
isn't an asdf plugin for it.

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

## Dependencies

Expand Down
3 changes: 2 additions & 1 deletion docs/dev-tools/backends/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ 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)

::: tip
If you'd like to contribute a new backend to mise, they're not difficult to write.
See [`./src/forge/`](https://github.com/jdx/mise/tree/main/src/forge) for examples.
See [`./src/backend/`](https://github.com/jdx/mise/tree/main/src/backend) for examples.
:::
2 changes: 1 addition & 1 deletion docs/dev-tools/backends/npm.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
You may install packages directly from [npmjs.org](https://npmjs.org/) even if there
isn't an asdf plugin for it.

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

## Dependencies

Expand Down
2 changes: 1 addition & 1 deletion docs/dev-tools/backends/pipx.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ You may install python packages directly from:
- Github
- Http

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

## Dependencies

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).
kattouf marked this conversation as resolved.
Show resolved Hide resolved

## 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 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.
2 changes: 1 addition & 1 deletion docs/dev-tools/backends/ubi.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

You may install Github Releases and URL packages directly using [ubi](https://github.com/houseabsolute/ubi) backend.

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

## Dependencies

Expand Down
Loading