mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-05-02 18:20:03 +00:00
Support other git hosting services (#312)
* Impl new mod `hosting` for detecting git hosting services * Refactor: Make `guess_git_hosting_services` associated fn of `GitHostingService` * Set default value of `PkgMeta::pkg_url` to `None` * Impl new method `get_redirected_final_url` * Use `get_redirected_final_url` in `GhCrateMeta::find` to make `guess_git_hosting_services` more accurate. * Use redirected `repo` in `GhCrateMeta::launch_baseline_find_tasks` * Refactor `<GhCrateMeta as Fetcher>::find` * Mod `get_default_pkg_url_template` to ret `&[&str]` * Add more default `pkg-url` templates * Rm `pkg-url` in `bin/Cargo.toml` Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
6b5e8f6875
commit
846e7ead91
7 changed files with 251 additions and 44 deletions
|
@ -15,7 +15,7 @@ fn parse_meta() {
|
|||
assert_eq!(&package.name, "cargo-binstall-test");
|
||||
|
||||
assert_eq!(
|
||||
&meta.pkg_url,
|
||||
meta.pkg_url.as_deref().unwrap(),
|
||||
"{ repo }/releases/download/v{ version }/{ name }-{ target }.{ archive-format }"
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue