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

Support cargo-binstall #168

Closed
vmiklos opened this issue May 27, 2022 · 2 comments · Fixed by #175
Closed

Support cargo-binstall #168

vmiklos opened this issue May 27, 2022 · 2 comments · Fixed by #175
Labels
C-enhancement Category: A new feature or an improvement for an existing one

Comments

@vmiklos
Copy link
Contributor

vmiklos commented May 27, 2022

Hi,

I'm trying to use cargo llvm-cov during CI, and it would be nice to be able to use cargo bininstall to set up cargo llvm-cov. It seems this would almost work:

$ ./cargo-binstall --no-confirm --version 0.4.1 cargo-llvm-cov
21:39:06 [INFO] Installing package: 'cargo-llvm-cov'
21:39:09 [INFO] Checking for package at: 'https://github.com/taiki-e/cargo-llvm-cov/releases/download/v0.4.1/cargo-llvm-cov-x86_64-unknown-linux-gnu-v0.4.1.tgz'

and then it finds that there is no such artifact & builds from source, which slows down CI.

So it looks for cargo-llvm-cov-x86_64-unknown-linux-gnu-v0.4.1.tgz, while you provide cargo-llvm-cov-x86_64-unknown-linux-gnu.tar.gz. Would it be possible to rename these, so cargo-bininstall works with cargo-llvm-cov?

Thanks! :-)

@taiki-e
Copy link
Owner

taiki-e commented May 28, 2022

It is intentional that the version number is not included, and I have no plans to change it. See cross-rs/cross#457 and taiki-e/cargo-hack#91 for the reason.

Instead, I would accept a PR to add metadata to Cargo.toml to support cargo-binstall.

@taiki-e taiki-e changed the title Include version string in release binariy tarballs Support cargo-binstall May 28, 2022
@taiki-e taiki-e added the C-enhancement Category: A new feature or an improvement for an existing one label May 28, 2022
vmiklos added a commit to vmiklos/cargo-llvm-cov that referenced this issue May 29, 2022
In contrast with the default documented at
<https://github.com/ryankurte/cargo-binstall#supporting-binary-installation>:

- our pkg-url doesn't contain a version
- bin-dir is just the executable without a parent directory
- pkg-fmt is tar.gz, not tgz

Fixes <taiki-e#168>.
@vmiklos
Copy link
Contributor Author

vmiklos commented May 29, 2022

I see, thanks for explaining the current state. Will submit a PR in a moment.

bors bot added a commit that referenced this issue May 29, 2022
175: Add metadata for cargo bininstall r=taiki-e a=vmiklos

In contrast with the default documented at
<https://github.com/ryankurte/cargo-binstall#supporting-binary-installation>:

- our pkg-url doesn't contain a version
- bin-dir is just the executable without a parent directory
- pkg-fmt is tar.gz, not tgz

Fixes <#168>.

Co-authored-by: Miklos Vajna <vmiklos@vmiklos.hu>
@bors bors bot closed this as completed in #175 May 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: A new feature or an improvement for an existing one
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants