From f6fdaf5b33d9e0c3b127dd574216d25810324971 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Fri, 31 May 2024 13:46:12 +0200 Subject: [PATCH] docs: Use ex_doc version built for previous release If current release is not available, we use the previous release. This can happen just as we release a new version of Erlang and Elixir and other tools have not been updated to work with it yet. --- otp_build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/otp_build b/otp_build index 991f07dcdb69..0ff86b3fde5f 100755 --- a/otp_build +++ b/otp_build @@ -1040,7 +1040,7 @@ do_update_ex_doc () OTP_VERSION=$(awk -F. '{ print $1 }' "$ERL_TOP/OTP_VERSION") EX_DOC_VSN=$(curl --silent -qI https://github.com/elixir-lang/ex_doc/releases/latest | awk -F '/' '/^location/ {print substr($NF, 1, length($NF)-1)}') - if grep "rc" "$ERL_TOP/OTP_VERSION" > /dev/null; then + if grep "rc" "$ERL_TOP/OTP_VERSION" > /dev/null || curl --silent -Li "https://github.com/elixir-lang/ex_doc/releases/download/${EX_DOC_VSN}/ex_doc_otp_${OTP_VERSION}" > /dev/null; then OTP_VERSION="$(($OTP_VERSION-1))" fi if command -v sha1sum > /dev/null && command -v sha256sum > /dev/null; then