mirror of
https://github.com/iv-org/invidious.git
synced 2026-09-06 00:52:45 -05:00
skip version checking if shard.yml file is missing
This commit is contained in:
parent
7e70ba2d74
commit
59dd9c9191
@ -58,13 +58,15 @@ require "./invidious/jobs/*"
|
||||
# or weird installations that lack the `shard.yml` file when compiling
|
||||
# Invidious.
|
||||
{% if !flag?(:skip_version_check) %}
|
||||
{% shard_yml = read_file("shard.yml") %}
|
||||
{% crystal_constraint = shard_yml.split('\n').find(&.starts_with?("crystal:")) %}
|
||||
{% minimum_version = crystal_constraint.split('"')[1].split(",").first.split(">=").last.strip %}
|
||||
{% 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 team behind the Crystal compiler itself recommend for your OS, see: https://crystal-lang.org/install/" }}
|
||||
{% if file_exists?("#{__DIR__}/../shard.yml") %}
|
||||
{% shard_yml = read_file("#{__DIR__}/../shard.yml") %}
|
||||
{% crystal_constraint = shard_yml.split('\n').find(&.starts_with?("crystal:")) %}
|
||||
{% minimum_version = crystal_constraint.split('"')[1].split(",").first.split(">=").last.strip %}
|
||||
{% 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 team behind the Crystal compiler itself recommend for your OS, see: https://crystal-lang.org/install/" }}
|
||||
{% end %}
|
||||
{% end %}
|
||||
{% end %}
|
||||
{% end %}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user