mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-25 23:00: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
16
.github/scripts/tests.sh
vendored
16
.github/scripts/tests.sh
vendored
|
@ -7,7 +7,7 @@ unset CARGO_HOME
|
|||
|
||||
# Install binaries using cargo-binstall
|
||||
# shellcheck disable=SC2086
|
||||
"./$1" binstall --log-level debug --no-confirm b3sum cargo-release cargo-binstall cargo-watch
|
||||
"./$1" binstall --log-level debug --no-confirm b3sum cargo-release cargo-binstall cargo-watch miniserve
|
||||
|
||||
# Test that the installed binaries can be run
|
||||
b3sum --version
|
||||
|
@ -15,11 +15,13 @@ cargo-release release --version
|
|||
cargo-binstall --help >/dev/null
|
||||
cargo binstall --help >/dev/null
|
||||
cargo watch -V
|
||||
miniserve -V
|
||||
|
||||
test_resources=".github/scripts/cargo-tomls"
|
||||
|
||||
# Install binaries using `--manifest-path`
|
||||
"./$1" binstall --force --log-level debug --manifest-path "$test_resources/gitlab-test-Cargo.toml" --no-confirm cargo-binstall
|
||||
# Also test default github template
|
||||
"./$1" binstall --force --log-level debug --manifest-path "$test_resources/github-test-Cargo.toml" --no-confirm cargo-binstall
|
||||
# Test that the installed binaries can be run
|
||||
cargo binstall --help >/dev/null
|
||||
|
||||
|
@ -63,6 +65,7 @@ cargo binstall --help >/dev/null
|
|||
# FIXME: remove/replace once #136 lands
|
||||
PATH="$test_resources/fake-cargo:$PATH"
|
||||
|
||||
# Test default GitLab pkg-url templates
|
||||
"./$1" binstall \
|
||||
--force \
|
||||
--manifest-path "$test_resources/gitlab-test-Cargo.toml" \
|
||||
|
@ -77,3 +80,12 @@ PATH="$test_resources/fake-cargo:$PATH"
|
|||
--log-level debug \
|
||||
--no-confirm \
|
||||
cargo-binstall
|
||||
|
||||
# Test default Github pkg-url templates,
|
||||
# with bin-dir provided
|
||||
"./$1" binstall \
|
||||
--force \
|
||||
--manifest-path "$test_resources/github-test-Cargo2.toml" \
|
||||
--log-level debug \
|
||||
--no-confirm \
|
||||
cargo-binstall
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue