File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -6,9 +6,7 @@ set -euxo pipefail
66# https://crates.io/data-access#api
77
88# Need to include versions to get the default and stable versions
9- meta=$( curl -L https://crates.io/api/v1/crates/libc? include=versions)
10-
11- echo " $meta " | jq -r ' .versions | map(select(.num | test("^0.2"))).[0].dl_path'
9+ meta=$( curl -L https://index.crates.io/li/bc/libc)
1210
1311# Versions to check against
1412if [ " ${SERIES:- } " = " 0.2" ]; then
2321# Find the most recent version matching a pattern.
2422release=$(
2523 echo " $meta " |
26- jq -er --arg pat " $pat " ' .versions | map(select(.num | test($pat))).[0] '
24+ jq -er --slurp -- arg pat " $pat " ' map(select(.vers | test($pat))) | last '
2725)
28- version=$( echo " $release " | jq -r ' .num' )
29- dl_path=$( echo " $release " | jq -r ' .dl_path' )
26+ version=$( echo " $release " | jq -r ' .vers' )
3027
3128crate_dir=" libc-$version "
32- curl -L " https://crates.io$dl_path " | tar xf -
29+ curl -L " https://static. crates.io/crates/libc/libc- $version .crate " | tar xf -
3330
3431# Need to convince Cargo it's not part of our workspace
3532echo ' [workspace]' >> " $crate_dir /Cargo.toml"
You can’t perform that action at this time.
0 commit comments