feat: show message for unsupported Crystal versions at compile time

This commit is contained in:
Fijxu 2026-08-06 15:39:44 -04:00
parent d6e4022cf2
commit acf934518e
No known key found for this signature in database
GPG Key ID: 32C1DDF333EDA6A4

View File

@ -50,6 +50,15 @@ require "./invidious/routes/**"
require "./invidious/jobs/base_job"
require "./invidious/jobs/*"
# Show a nice message for unsupported versions of the Crystal compiler,
# encouraging the user compiling Invidiou, to update it's Crystal compiler
# version.
{% if compare_versions(Crystal::VERSION, "1.12.0") < 0 %}
{{ raise "Crystal version 1.12.0 or newer is required to build Invidious, \
you currently have Crystal version #{Crystal::VERSION}, \
update it to a new version to be able to build Invidious." }}
{% end %}
# Declare the base namespace for invidious
module Invidious
end