mirror of https://github.com/Wilfred/difftastic/
Add `cargo binstall` metadata
Right now `cargo binstall` cannot find the pre-compiled `difftastic`
assets:
```
~
❯ cargo binstall difftastic
INFO resolve: Resolving package: 'difftastic'
WARN resolve: The package will be installed from source (with cargo)
Do you wish to continue? yes/[no]
? no
WARN Installation cancelled
~ took 18s
❯ cargo binstall difftastic --pkg-url="{ repo }/releases/download/{ version }/difft-{ target }.{ archive-format }"
INFO resolve: Resolving package: 'difftastic'
WARN resolve: The package will be downloaded from github.com
INFO resolve: This will install the following binaries:
INFO resolve: - difft (difft -> /home/michel/.cargo/bin/difft-v0.38.0)
INFO resolve: And create (or update) the following symlinks:
INFO resolve: - difft (/home/michel/.cargo/bin/difft -> difft-v0.38.0)
Do you wish to continue? yes/[no]
? yes
INFO install: Installing binaries...
INFO Done in 9.277840305s
```
Adding this `pkg-url` override to `Cargo.toml` allows `binstall` to find
the pre-compiled archives:
```
~
❯ cargo binstall --manifest-path ~/src/github/Wilfred/difftastic/Cargo.toml difftastic
INFO resolve: Resolving package: 'difftastic'
INFO resolve: difftastic v0.38.0 is already installed, use --force to override
INFO Done in 5.327886ms
~
❯ cargo binstall --manifest-path ~/src/github/Wilfred/difftastic/Cargo.toml difftastic --force
INFO resolve: Resolving package: 'difftastic'
WARN resolve: The package will be downloaded from github.com
INFO resolve: This will install the following binaries:
INFO resolve: - difft (difft -> /home/michel/.cargo/bin/difft-v0.38.0)
INFO resolve: And create (or update) the following symlinks:
INFO resolve: - difft (/home/michel/.cargo/bin/difft -> difft-v0.38.0)
Do you wish to continue? yes/[no]
? yes
INFO install: Installing binaries...
INFO Done in 5.484314255s
```
Signed-off-by: Michel Alexandre Salim <michel@michel-slm.name>
pull/431/head
parent
8e190677e7
commit
08041e5793
Loading…
Reference in New Issue