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:
Jiahao XU 2022-08-24 17:16:26 +10:00 committed by GitHub
parent 6b5e8f6875
commit 846e7ead91
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 251 additions and 44 deletions

View file

@ -10,7 +10,6 @@ edition = "2021"
license = "GPL-3.0"
[package.metadata.binstall]
pkg-url = "{ repo }/releases/download/v{ version }/{ name }-{ target }.{ archive-format }"
bin-dir = "{ bin }{ binary-ext }"
[package.metadata.binstall.overrides.x86_64-pc-windows-msvc]