mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-20 12:38:43 +00:00

Fixed #838 - Add new key `subcrate` for rendering `pkg-url` - Add new release paths in GitHub, GitLab & SourceForge using key `subcrate` for auto-detection - Add subcrate detection for GitHub and GitLab - Add `debug!` when using gh api token in `GhApiClient::new` - Add subcrate testing to `e2e-tests/subcrate.sh` - Bump cargo-release to 0.24.9 in e2e-tests/live.sh to fix test failure on MacOS without libssl installed in `/usr/local/`. - Optimize GhCrateMeta: Detect subcrate and repo-host in `Data::get_repo_info` to cache the result and avoid duplicate works, this also makes the code more ergonomic by removing the need to some `unwrap()` plus making it more efficient since we don't need to clone the url just to modify it. - Add instrument to `Data::get_repo_info` - Fix `shellcheck` err in `e2e-tests/*.sh` Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
18 lines
747 B
Bash
Executable file
18 lines
747 B
Bash
Executable file
#!/bin/bash
|
|
|
|
set -euxo pipefail
|
|
|
|
unset CARGO_INSTALL_ROOT
|
|
|
|
CARGO_HOME=$(mktemp -d 2>/dev/null || mktemp -d -t 'cargo-home')
|
|
export CARGO_HOME
|
|
export PATH="$CARGO_HOME/bin:$PATH"
|
|
|
|
# Test skip when installed
|
|
"./$1" binstall --no-confirm --force cargo-binstall@0.11.1
|
|
"./$1" binstall --log-level=info --no-confirm cargo-binstall@0.11.1 | grep -q 'cargo-binstall v0.11.1 is already installed'
|
|
|
|
## Test When 0.11.0 is installed but can be upgraded.
|
|
"./$1" binstall --no-confirm cargo-binstall@0.12.0
|
|
"./$1" binstall --log-level=info --no-confirm cargo-binstall@0.12.0 | grep -q 'cargo-binstall v0.12.0 is already installed'
|
|
"./$1" binstall --log-level=info --no-confirm cargo-binstall@^0.12.0 | grep -q -v 'cargo-binstall v0.12.0 is already installed'
|