mirror of
https://github.com/taiki-e/install-action.git
synced 2026-05-10 06:30:32 +00:00
Fix cargo-binstall version check
This commit is contained in:
8
.github/workflows/ci.yml
vendored
8
.github/workflows/ci.yml
vendored
@@ -53,6 +53,14 @@ jobs:
|
|||||||
- uses: ./
|
- uses: ./
|
||||||
with:
|
with:
|
||||||
tool: ${{ matrix.tool }}
|
tool: ${{ matrix.tool }}
|
||||||
|
# We use the version output to check the version of binstall, but they
|
||||||
|
# several times change the version output format in the past so we need to
|
||||||
|
# check it with CI. (e.g., 0.14.0->0.16.0 update change it
|
||||||
|
# from "cargo-binstall <version>" to "<version>")
|
||||||
|
- run: |
|
||||||
|
if [[ "$(cargo binstall -V)" != "$(jq -r '.latest.version' manifests/cargo-binstall.json)" ]]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
test-container:
|
test-container:
|
||||||
strategy:
|
strategy:
|
||||||
|
|||||||
2
main.sh
2
main.sh
@@ -227,7 +227,7 @@ install_cargo_binstall() {
|
|||||||
binstall_version=$(jq -r '.latest.version' "${manifest_dir}/cargo-binstall.json")
|
binstall_version=$(jq -r '.latest.version' "${manifest_dir}/cargo-binstall.json")
|
||||||
local install_binstall='1'
|
local install_binstall='1'
|
||||||
if [[ -f "${cargo_bin}/cargo-binstall${exe}" ]]; then
|
if [[ -f "${cargo_bin}/cargo-binstall${exe}" ]]; then
|
||||||
if [[ "$(cargo binstall -V)" == "cargo-binstall ${binstall_version}" ]]; then
|
if [[ "$(cargo binstall -V)" == "${binstall_version}" ]]; then
|
||||||
info "cargo-binstall already installed on in ${cargo_bin}/cargo-binstall${exe}"
|
info "cargo-binstall already installed on in ${cargo_bin}/cargo-binstall${exe}"
|
||||||
install_binstall=''
|
install_binstall=''
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user