From af2bad5f3028485dabf476db13e9a014aba38660 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Fri, 22 Nov 2024 15:51:56 -0800 Subject: [PATCH] Apply `if` correctly for pre-releases MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If we had a 4.0.x pre-release now (like a 4.0.5-rc), we would apply this `if` statement incorrectly. 😅 --- Dockerfile-alpine.template | 2 +- Dockerfile-ubuntu.template | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile-alpine.template b/Dockerfile-alpine.template index 06b3ac24..c58a4dea 100644 --- a/Dockerfile-alpine.template +++ b/Dockerfile-alpine.template @@ -274,7 +274,7 @@ RUN set -eux; \ xz \ ; \ \ -{{ if env.version | IN("3.13", "4.0") then ( -}} +{{ if env.version | rtrimstr("-rc") | IN("3.13", "4.0") then ( -}} RABBITMQ_SOURCE_URL="https://github.com/rabbitmq/rabbitmq-server/releases/download/v$RABBITMQ_VERSION/rabbitmq-server-generic-unix-latest-toolchain-$RABBITMQ_VERSION.tar.xz"; \ {{ ) else ( -}} RABBITMQ_SOURCE_URL="https://github.com/rabbitmq/rabbitmq-server/releases/download/v$RABBITMQ_VERSION/rabbitmq-server-generic-unix-$RABBITMQ_VERSION.tar.xz"; \ diff --git a/Dockerfile-ubuntu.template b/Dockerfile-ubuntu.template index 3965d413..05793403 100644 --- a/Dockerfile-ubuntu.template +++ b/Dockerfile-ubuntu.template @@ -275,7 +275,7 @@ RUN set -eux; \ ; \ rm -rf /var/lib/apt/lists/*; \ \ -{{ if env.version | IN("3.13", "4.0") then ( -}} +{{ if env.version | rtrimstr("-rc") | IN("3.13", "4.0") then ( -}} RABBITMQ_SOURCE_URL="https://github.com/rabbitmq/rabbitmq-server/releases/download/v$RABBITMQ_VERSION/rabbitmq-server-generic-unix-latest-toolchain-$RABBITMQ_VERSION.tar.xz"; \ {{ ) else ( -}} RABBITMQ_SOURCE_URL="https://github.com/rabbitmq/rabbitmq-server/releases/download/v$RABBITMQ_VERSION/rabbitmq-server-generic-unix-$RABBITMQ_VERSION.tar.xz"; \