From 86767e47d7d3d3aa83e3d45fd7cc6785edacb30a Mon Sep 17 00:00:00 2001 From: Ilya Grigoriev Date: Tue, 19 Sep 2023 22:54:42 -0700 Subject: [PATCH] cargo: make `jj` installable with `cargo binstall` https://github.com/cargo-bins/cargo-binstall Note that `jj` will only become installable once the next release is published to crates.io. For this reason, I am planning to wait until then before documenting the fact that `jj` can be installed this way. At that point, `cargo binstall jj-cli` should be sufficient. Before then, it's possible to test that this will work by doing ``` cargo binstall jj-cli --force --strategies crate-meta-data --log-level debug --dry-run --manifest-path cli/Cargo.toml ``` Without --dry-run, this should install the 0.9 release if run on `cli/Cargo.toml` form this commit. --- cli/Cargo.toml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cli/Cargo.toml b/cli/Cargo.toml index f40316c47..261fef02d 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -84,3 +84,8 @@ packaging = [] test-fakes = [] vendored-openssl = ["git2/vendored-openssl", "jj-lib/vendored-openssl"] watchman = ["jj-lib/watchman"] + +[package.metadata.binstall] +# The archive name is jj, not jj-cli. Also, `cargo binstall` gets +# confused by the `v` before versions in archive name. +pkg-url="{ repo }/releases/download/v{ version }/jj-v{ version }-{ target }.{ archive-format }"