From 5fb5a0e833ab18712025eb0afcc9a733e30e566d Mon Sep 17 00:00:00 2001 From: Fijxu Date: Thu, 6 Aug 2026 20:48:55 -0400 Subject: [PATCH] set min version in a variable --- src/invidious.cr | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/invidious.cr b/src/invidious.cr index 7c4096f4..7ae1406c 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -53,10 +53,13 @@ require "./invidious/jobs/*" # Show a nice message for unsupported versions of the Crystal compiler, # encouraging the user compiling Invidious, to update it's Crystal compiler # version. -{% if compare_versions(Crystal::VERSION, "1.14.1") < 0 %} - {{ raise "Crystal version 1.14.1 or newer is required to build Invidious. \ - You currently have Crystal version #{Crystal::VERSION} installed. \ - We recommend that you install it following the way that the Crystal compiler itself recommend for your OS, see: https://crystal-lang.org/install/" }} +{% begin %} + {% minimum_version = "1.14.1" %} + {% if compare_versions(Crystal::VERSION, minimum_version) < 0 %} + {{ raise "Crystal version #{minimum_version} or newer is required to build Invidious. \ + You currently have Crystal version #{Crystal::VERSION} installed. \ + We recommend that you install it following the way that the Crystal compiler itself recommend for your OS, see: https://crystal-lang.org/install/" }} + {% end %} {% end %} # Declare the base namespace for invidious