mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-25 06:40:03 +00:00
Improve auto discover (#433)
* Add new field `gh_crate_meta::Context::archive_suffix` * Support `archive_suffix = ""` for unix * Use `archive-suffix` in `FULL_FILENAMES` & `NOVERSION_FILENAMES` to support `PkgFmt::Bin` * Simplify `PkgFmt::extensions` * Fix `default_bin_dir_template` in `infer_bin_dir_template`: Fix typo `archive_suffix` * Test `default_bin_dir_template` in CI * Fix installation of `PkgFmt::Bin`: `chmod +x $bin` on unix if fmt == Bin * Add miniserve to `.github/scripts/tests.sh` * Update `SUPPORT.md` * Add github-test-Cargo2.toml to test Github pkg-url with bin-dir provided * Avoid allocation on processing `path_normalized` in `BinFile::from_product` Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
c15903684f
commit
4ba1e221ea
10 changed files with 94 additions and 51 deletions
|
@ -14,15 +14,15 @@ pub enum RepositoryHost {
|
|||
/// Make sure to update possible_dirs in `bins::infer_bin_dir_template`
|
||||
/// if you modified FULL_FILENAMES or NOVERSION_FILENAMES.
|
||||
pub const FULL_FILENAMES: &[&str] = &[
|
||||
"{ name }-{ target }-v{ version }.{ archive-format }",
|
||||
"{ name }-{ target }-{ version }.{ archive-format }",
|
||||
"{ name }-{ version }-{ target }.{ archive-format }",
|
||||
"{ name }-v{ version }-{ target }.{ archive-format }",
|
||||
"{ name }-{ target }-v{ version }{ archive-suffix }",
|
||||
"{ name }-{ target }-{ version }{ archive-suffix }",
|
||||
"{ name }-{ version }-{ target }{ archive-suffix }",
|
||||
"{ name }-v{ version }-{ target }{ archive-suffix }",
|
||||
];
|
||||
|
||||
pub const NOVERSION_FILENAMES: &[&str] = &[
|
||||
"{ name }-{ target }.{ archive-format }",
|
||||
"{ name }.{ archive-format }",
|
||||
"{ name }-{ target }{ archive-suffix }",
|
||||
"{ name }{ archive-suffix }",
|
||||
];
|
||||
|
||||
impl RepositoryHost {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue