From be9c5f2a40be484caab3cef52957bb39cf350d08 Mon Sep 17 00:00:00 2001 From: lepapareil Date: Mon, 29 Nov 2021 18:13:53 +0100 Subject: [PATCH] Switch to https://crates.io/api/v1 for dependency_age.sh --- ci/dependency_age.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/dependency_age.sh b/ci/dependency_age.sh index addc9d983..df76d07e1 100755 --- a/ci/dependency_age.sh +++ b/ci/dependency_age.sh @@ -10,7 +10,7 @@ color_reset=$(echo -ne "\033[0m") for package in packages/* ; do echo -e "\n=> dependency age for ${package}\n" while read -r dependency actual_version ; do - last_version=$(curl --head "https://docs.rs/${dependency}" 2>&1 | grep --ignore-case "location:" | cut --delimiter "/" --field 5 | grep --extended-regexp "^[0-9].*.[0-9].*.[0-9]$") + last_version=$(curl -kLs https://crates.io/api/v1/crates/${dependency} | jq -r .crate.max_stable_version | grep --extended-regexp "^[0-9].*.[0-9].*.[0-9]$") if [ -z "${last_version}" ] ; then echo "${color_red}runtime error${color_reset}, i could not get last version from https://docs.rs/${dependency}" exit 1