mirror of
https://github.com/taiki-e/install-action.git
synced 2026-05-10 22:50:32 +00:00
Do not use cargo-binstall for upgrade for cargo-binstall (#23)
This commit is contained in:
15
main.sh
15
main.sh
@@ -81,8 +81,18 @@ host_triple() {
|
|||||||
install_cargo_binstall() {
|
install_cargo_binstall() {
|
||||||
# https://github.com/cargo-bins/cargo-binstall/releases
|
# https://github.com/cargo-bins/cargo-binstall/releases
|
||||||
binstall_version="0.13.3"
|
binstall_version="0.13.3"
|
||||||
|
install_binstall='1'
|
||||||
|
if [[ -f "${cargo_bin}/cargo-binstall${exe}" ]]; then
|
||||||
|
if [[ "$(cargo binstall -V)" == "cargo-binstall ${binstall_version}" ]]; then
|
||||||
|
info "cargo-binstall already installed on in ${cargo_bin}/cargo-binstall${exe}"
|
||||||
|
install_binstall=''
|
||||||
|
else
|
||||||
|
info "cargo-binstall already installed on in ${cargo_bin}/cargo-binstall${exe}, but is not compatible version with install-action, upgrading"
|
||||||
|
rm "${cargo_bin}/cargo-binstall${exe}"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ ! -f "${cargo_bin}/cargo-binstall" ]]; then
|
if [[ -n "${install_binstall}" ]]; then
|
||||||
info "installing cargo-binstall"
|
info "installing cargo-binstall"
|
||||||
|
|
||||||
host_triple
|
host_triple
|
||||||
@@ -109,9 +119,6 @@ install_cargo_binstall() {
|
|||||||
download "${url}" "${cargo_bin}" "cargo-binstall${exe}"
|
download "${url}" "${cargo_bin}" "cargo-binstall${exe}"
|
||||||
info "cargo-binstall installed at $(type -P "cargo-binstall${exe}")"
|
info "cargo-binstall installed at $(type -P "cargo-binstall${exe}")"
|
||||||
x cargo binstall -V
|
x cargo binstall -V
|
||||||
else
|
|
||||||
info "cargo-binstall already installed on in ${cargo_bin}/cargo-binstall, upgrading"
|
|
||||||
cargo binstall --secure --no-confirm --version "=${binstall_version}" cargo-binstall
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
cargo_binstall() {
|
cargo_binstall() {
|
||||||
|
|||||||
Reference in New Issue
Block a user