diff --git a/src/invidious.cr b/src/invidious.cr index 09fbb624..c77904bb 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -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