From 5a8129fe788d6c9308e89e779b4af10172cb84b0 Mon Sep 17 00:00:00 2001 From: Tim Date: Wed, 20 Dec 2023 11:24:44 -0600 Subject: [PATCH] feat: detect RCs --- lib/misc_funcs.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/misc_funcs.sh b/lib/misc_funcs.sh index 2e5f95c..d8f9aa9 100644 --- a/lib/misc_funcs.sh +++ b/lib/misc_funcs.sh @@ -187,8 +187,12 @@ function fix_elixir_version() { # If we detect a version string (e.g. 1.14 or 1.14.0) we prefix it with "v" if [[ ${elixir_version} =~ ^[0-9]+\.[0-9]+ ]]; then - # strip out any non-digit non-dot characters - elixir_version=$(echo "$elixir_version" | sed 's/[^0-9.]*//g') + if [[ ${elixir_version} =~ ^[0-9]+\.[0-9]+\.[0-9]+-rc\.[0-9]+$ ]]; then + echo "Detected release candidate" + else + # strip out any non-digit non-dot characters + elixir_version=$(echo "$elixir_version" | sed 's/[^0-9.]*//g') + fi elixir_version=v${elixir_version} fi