mirror of
https://github.com/uutils/coreutils
synced 2024-10-01 13:35:03 +00:00
show-utils.sh: fix jq query to get coreutils deps
In jq query, the correct regex to select .id is ".*coreutils[ |@|#]\\d+\\.\\d+\\.\\d+" With cargo <= v1.76, id = "coreutils 0.0.26 (path+file://<coreutils local directory>)" With cargo >= v1.77, - if local path == '<parent directory>/coreutils/', id = "path+file://<parent directory>/coreutils#0.0.26" - if local path != '<parent directory>/coreutils/', id = "path+file://<coreutils local directory>#coreutils@0.0.26" Fix uutils/coreutils#6479 Signed-off-by: Laurent Cheylus <foxy@free.fr>
This commit is contained in:
parent
c9f4742f3b
commit
e50a3a4471
|
@ -35,6 +35,8 @@ cd "${project_main_dir}" &&
|
||||||
else
|
else
|
||||||
# Find 'coreutils' id with regex
|
# Find 'coreutils' id with regex
|
||||||
# with cargo v1.76.0, id = "coreutils 0.0.26 (path+file://<coreutils local directory>)"
|
# with cargo v1.76.0, id = "coreutils 0.0.26 (path+file://<coreutils local directory>)"
|
||||||
# with cargo v1.77.0, id = "path+file://<coreutils local directory>#coreutils@0.0.26"
|
# with cargo >= v1.77.0
|
||||||
cargo metadata "$@" --format-version 1 | jq -r '[.resolve.nodes[] | select(.id|match(".*coreutils[ |@]\\d+\\.\\d+\\.\\d+")) | .deps[] | select(.pkg|match("uu_")) | .name | sub("^uu_"; "")] | sort | join(" ")'
|
# - if local path != '<...>/coreutils' id = "path+file://<coreutils local directory>#coreutils@0.0.26"
|
||||||
|
# - if local path == '<...>/coreutils' id = "path+file://<parent directory>/coreutils#0.0.26"
|
||||||
|
cargo metadata "$@" --format-version 1 | jq -r '[.resolve.nodes[] | select(.id|match(".*coreutils[ |@|#]\\d+\\.\\d+\\.\\d+")) | .deps[] | select(.pkg|match("uu_")) | .name | sub("^uu_"; "")] | sort | join(" ")'
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue