From 59c242eaef66876d919dc109c909b9e0ad325c22 Mon Sep 17 00:00:00 2001 From: mulhern Date: Mon, 13 Oct 2025 11:13:38 -0400 Subject: [PATCH] Specify --dev dependency for loopdev-3 Otherwise, cargo-add adds loopdev-3 as a regular source dependency, rather than overwriting the existing dev dependency specification. Signed-off-by: mulhern --- stratisd-modify/action.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/stratisd-modify/action.yml b/stratisd-modify/action.yml index 870da1e..fb29386 100644 --- a/stratisd-modify/action.yml +++ b/stratisd-modify/action.yml @@ -18,13 +18,15 @@ runs: # Stratis project dependencies specified in Cargo.toml DEPENDENCIES=("devicemapper" "libblkid-rs" "libcryptsetup-rs-sys" "libcryptsetup-rs" "loopdev-3") REPOS=("devicemapper-rs" "libblkid-rs" "libcryptsetup-rs" "libcryptsetup-rs" "loopdev-3") + DEPENDENCY_TYPE=("" "" "" "" "--dev") TREE_ARGS=() for (( i=0; i<${#REPOS[@]}; i++ )); do dependency=${DEPENDENCIES[$i]} repo=${REPOS[$i]} - cargo add $dependency --git https://github.com/jbaublitz/$repo --branch $GITHUB_HEAD_REF + dependency_type=${DEPENDENCY_TYPE[$i]} + cargo add $dependency $dependency_type --git https://github.com/jbaublitz/$repo --branch $GITHUB_HEAD_REF jbaublitz=$? - cargo add $dependency --git https://github.com/mulkieran/$repo --branch $GITHUB_HEAD_REF + cargo add $dependency $dependency_type --git https://github.com/mulkieran/$repo --branch $GITHUB_HEAD_REF mulkieran=$? (( jbaublitz == 0 && mulkieran == 0)) && { echo "Duplicate $repo branches"; exit 1; } TREE_ARGS+=(--invert=$dependency)