mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-27 10:59:53 +00:00
17 lines
No EOL
269 B
Bash
Executable file
17 lines
No EOL
269 B
Bash
Executable file
#!/bin/bash
|
|
|
|
set -eu
|
|
|
|
if [[ $# < 1 ]]; then
|
|
echo "Usage: $0 <crate_name>" >&2
|
|
exit 1
|
|
fi
|
|
|
|
CRATE_NAME=$1
|
|
|
|
cargo metadata \
|
|
--no-deps \
|
|
--format-version=1 \
|
|
| jq \
|
|
--raw-output \
|
|
".packages[] | select(.name == \"${CRATE_NAME}\") | .version" |