set min version in a variable

This commit is contained in:
Fijxu 2026-08-06 20:48:55 -04:00
parent 67821fa322
commit 5fb5a0e833
No known key found for this signature in database
GPG Key ID: 32C1DDF333EDA6A4

View File

@ -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. \
{% 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