rpm-ostree/ci/install-extra-builddeps.sh
Luca BRUNO 85640d44f6 ci: fix install-extra logic
This fixes `install-extra-builddeps.sh` helper, by letting cargo
detect whether the target binary is already present in the
environment with the expected version.
This is in order to avoid mismatches in generated code when the
library version is bumped, and stale binaries are present on
the system.
2021-01-25 17:05:53 +01:00

14 lines
607 B
Bash
Executable File

#!/usr/bin/env bash
# cxx.rs (cxxbridge) isn't packaged in Fedora today. Both it and cbindgen generate
# source code, which we vendor along with our dependent crates into release
# tarballs. Note in the future it's likely we stop using cbindgen entirely in
# favor of cxx.rs.
set -euo pipefail
CXX_VER=$(cargo metadata --format-version 1 | jq -r '.packages[]|select(.name == "cxx").version')
cargo install cxxbridge-cmd --version "${CXX_VER}"
CBINDGEN_VER=$(cargo metadata --format-version 1 | jq -r '.packages[]|select(.name == "cbindgen").version')
cargo install cbindgen --version "${CBINDGEN_VER}"