From 1c9427de118267d513b23d7a041a1b59d1733a6d Mon Sep 17 00:00:00 2001 From: Kattouf Date: Tue, 4 Jun 2024 12:55:35 +0700 Subject: [PATCH 1/5] add spm backend doc --- docs/dev-tools/backends/index.md | 1 + docs/dev-tools/backends/spm.md | 41 ++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 docs/dev-tools/backends/spm.md diff --git a/docs/dev-tools/backends/index.md b/docs/dev-tools/backends/index.md index cc649fd7c5..4243903ede 100644 --- a/docs/dev-tools/backends/index.md +++ b/docs/dev-tools/backends/index.md @@ -7,6 +7,7 @@ In addition to asdf plugins, you can also directly install CLIs with some packag * [Go](/dev-tools/backends/go) * [NPM](/dev-tools/backends/npm) * [Pipx](/dev-tools/backends/pipx) +* [SPM](/dev-tools/backends/spm) * [Ubi](/dev-tools/backends/ubi) * [More coming soon!](https://github.com/jdx/mise/discussions/1250) diff --git a/docs/dev-tools/backends/spm.md b/docs/dev-tools/backends/spm.md new file mode 100644 index 0000000000..35b1d66f4a --- /dev/null +++ b/docs/dev-tools/backends/spm.md @@ -0,0 +1,41 @@ +# SPM Backend + +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 +... +``` + +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/tuist@4.15.0` | +| Github url for latest release version | `spm:https://github.com/tuist/tuist.git` | +| Github url for specific release version | `spm:https://github.com/tuist/tuist.git@4.15.0` | + +Other syntax may work but is unsupported and untested. From d44f9ea9f360b2888225cfb6de2df3beda136015 Mon Sep 17 00:00:00 2001 From: Kattouf Date: Tue, 4 Jun 2024 12:57:10 +0700 Subject: [PATCH 2/5] fix doc links: rename forge->backend --- docs/dev-tools/backends/cargo.md | 2 +- docs/dev-tools/backends/go.md | 2 +- docs/dev-tools/backends/index.md | 2 +- docs/dev-tools/backends/npm.md | 2 +- docs/dev-tools/backends/pipx.md | 2 +- docs/dev-tools/backends/ubi.md | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/dev-tools/backends/cargo.md b/docs/dev-tools/backends/cargo.md index ea2f896559..b645a6c167 100644 --- a/docs/dev-tools/backends/cargo.md +++ b/docs/dev-tools/backends/cargo.md @@ -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 diff --git a/docs/dev-tools/backends/go.md b/docs/dev-tools/backends/go.md index e6338d5662..b6c52b4bb5 100644 --- a/docs/dev-tools/backends/go.md +++ b/docs/dev-tools/backends/go.md @@ -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 diff --git a/docs/dev-tools/backends/index.md b/docs/dev-tools/backends/index.md index 4243903ede..019ac46e40 100644 --- a/docs/dev-tools/backends/index.md +++ b/docs/dev-tools/backends/index.md @@ -13,5 +13,5 @@ In addition to asdf plugins, you can also directly install CLIs with some packag ::: 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. ::: diff --git a/docs/dev-tools/backends/npm.md b/docs/dev-tools/backends/npm.md index acded46dff..2455fcbe1b 100644 --- a/docs/dev-tools/backends/npm.md +++ b/docs/dev-tools/backends/npm.md @@ -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 diff --git a/docs/dev-tools/backends/pipx.md b/docs/dev-tools/backends/pipx.md index 6e0c7a5d36..300e9aa9ad 100644 --- a/docs/dev-tools/backends/pipx.md +++ b/docs/dev-tools/backends/pipx.md @@ -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 diff --git a/docs/dev-tools/backends/ubi.md b/docs/dev-tools/backends/ubi.md index 581e458d4d..d54f91d7b8 100644 --- a/docs/dev-tools/backends/ubi.md +++ b/docs/dev-tools/backends/ubi.md @@ -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 From e157b1c7e55fa1f02de6e0e120c22d2b0093b75f Mon Sep 17 00:00:00 2001 From: Kattouf Date: Tue, 4 Jun 2024 14:46:58 +0700 Subject: [PATCH 3/5] update supported syntax block --- docs/dev-tools/backends/spm.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/dev-tools/backends/spm.md b/docs/dev-tools/backends/spm.md index 35b1d66f4a..12e6b97cd0 100644 --- a/docs/dev-tools/backends/spm.md +++ b/docs/dev-tools/backends/spm.md @@ -29,13 +29,13 @@ The version will be set in `~/.config/mise/config.toml` with the following forma "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/tuist@4.15.0` | -| Github url for latest release version | `spm:https://github.com/tuist/tuist.git` | -| Github url for specific release version | `spm:https://github.com/tuist/tuist.git@4.15.0` | +### Supported Syntax + +| Description | Usage | +| --------------------------------------------- | --------------------------------------------------------- | +| Github shorthand for latest release version | `spm:tuist/tuist` | +| Github shorthand for specific release version | `spm:tuist/tuist@4.15.0` | +| Github url for latest release version | `spm:https://github.com/tuist/tuist.git` | +| Github url for specific release version | `spm:https://github.com/tuist/tuist.git@4.15.0` | Other syntax may work but is unsupported and untested. From 0cb90984d335a3b1ba0389087c8355cba40e50a0 Mon Sep 17 00:00:00 2001 From: Vasiliy Kattouf Date: Tue, 4 Jun 2024 17:18:05 +0700 Subject: [PATCH 4/5] add note about xcode-swift MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Pedro Piñera Buendía <663605+pepicrft@users.noreply.github.com> --- docs/dev-tools/backends/spm.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/dev-tools/backends/spm.md b/docs/dev-tools/backends/spm.md index 12e6b97cd0..ad1f1f8234 100644 --- a/docs/dev-tools/backends/spm.md +++ b/docs/dev-tools/backends/spm.md @@ -8,6 +8,9 @@ The code for this is inside of the mise repository at [`./src/backend/spm.rs`](h This relies on having `swift` installed. You can install it according to the [instructions](https://www.swift.org/install). +> [!NOTE] +> If you have Xcode installed and selected in your system via `xcode-select`, Swift is already available through the toolchain embedded in the Xcode installation. + ## Usage The following installs the latest version of `tuist` From ae797c9b455a291b0cef112b6dd1cead6c6c8aff Mon Sep 17 00:00:00 2001 From: Kattouf Date: Tue, 4 Jun 2024 17:18:54 +0700 Subject: [PATCH 5/5] add item to site sidebar --- docs/.vitepress/config.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index aa3b251df1..b662268936 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -50,6 +50,7 @@ export default defineConfig({ { text: 'go', link: '/dev-tools/backends/go' }, { text: 'npm', link: '/dev-tools/backends/npm' }, { text: 'pipx', link: '/dev-tools/backends/pipx' }, + { text: 'spm', link: '/dev-tools/backends/spm' }, { text: 'ubi', link: '/dev-tools/backends/ubi' }, ] }