cargo-binstall/crates
Kristof Mattei fdfc89c287
fix: normalize GitHub URLs ending in .git to not ending in .git (#1804)
* fix: normalize GitHub URLs ending in .git to not ending in .git

* Refactor `Data::get_repo_info`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Fix `get_repo_info` for repo with `.git` suffix

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Add e2e-tests to cover it

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Always try geting the redirected url

This would help:
 - redirect public gh repo `.git` to its canonical form
 - redirect public gh repo, which has been recently renamed
 - cases where redirection is needed to get the real repo

This commit make it fallbacks to the previou surl, if getting
the redirected url fail, in case the repository is private.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Add more e2e-tests

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Optimize: Do not try redirect if gh_get_repo_info fail

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Minor refactor

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

---------

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Co-authored-by: Jiahao XU <Jiahao_XU@outlook.com>
2024-07-14 14:45:41 +00:00
..
atomic-file-install release: atomic-file-install v1.0.5 (#1812) 2024-07-06 05:06:54 +00:00
bin build(deps): bump compact_str from 0.7.1 to 0.8.0 in the deps group (#1817) 2024-07-13 04:10:11 +00:00
binstalk build(deps): bump compact_str from 0.7.1 to 0.8.0 in the deps group (#1817) 2024-07-13 04:10:11 +00:00
binstalk-bins build(deps): bump compact_str from 0.7.1 to 0.8.0 in the deps group (#1817) 2024-07-13 04:10:11 +00:00
binstalk-downloader build(deps): bump compact_str from 0.7.1 to 0.8.0 in the deps group (#1817) 2024-07-13 04:10:11 +00:00
binstalk-fetchers fix: normalize GitHub URLs ending in .git to not ending in .git (#1804) 2024-07-14 14:45:41 +00:00
binstalk-git-repo-api build(deps): bump compact_str from 0.7.1 to 0.8.0 in the deps group (#1817) 2024-07-13 04:10:11 +00:00
binstalk-manifests Mark binstalk_manifests::cargo_crates_v1::CratesToml::insert private (#1818) 2024-07-13 08:49:45 +00:00
binstalk-registry build(deps): bump compact_str from 0.7.1 to 0.8.0 in the deps group (#1817) 2024-07-13 04:10:11 +00:00
binstalk-types build(deps): bump compact_str from 0.7.1 to 0.8.0 in the deps group (#1817) 2024-07-13 04:10:11 +00:00
cargo-toml-workspace build(deps): bump compact_str from 0.7.1 to 0.8.0 in the deps group (#1817) 2024-07-13 04:10:11 +00:00
detect-targets release: detect-targets v0.1.17 (#1682) 2024-05-03 00:29:20 +00:00
detect-wasi Bump tempfile from 3.4.0 to 3.5.0 (#967) 2023-03-30 02:49:38 +00:00
fs-lock release: fs-lock v0.1.3 (#1642) 2024-03-09 03:33:53 +00:00
normalize-path release: normalize-path v0.2.1 (#1173) 2023-06-26 08:22:39 +00:00