Add e2e-test/private-github-repo

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2024-06-05 23:36:32 +10:00
parent fba7e01c5d
commit be3aeca6b2
No known key found for this signature in database
GPG key ID: 76D1E687CA3C4928
3 changed files with 36 additions and 1 deletions

View file

@ -0,0 +1,21 @@
#!/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"
# Install binaries using `--manifest-path`
# Also test default github template
"./$1" binstall --force --manifest-path "manifests/private-github-repo-test-Cargo.toml" --no-confirm cargo-binstall --strategies crate-meta-data
# Test that the installed binaries can be run
cargo binstall --help >/dev/null
cargo_binstall_version="$(cargo binstall -V)"
echo "$cargo_binstall_version"
[ "$cargo_binstall_version" = "cargo-binstall 0.12.0" ]