mirror of
https://github.com/iv-org/invidious.git
synced 2026-09-07 17:42:46 -05:00
skip version checking if shard.yml file is missing
This commit is contained in:
parent
7e70ba2d74
commit
59dd9c9191
@ -58,7 +58,8 @@ require "./invidious/jobs/*"
|
|||||||
# or weird installations that lack the `shard.yml` file when compiling
|
# or weird installations that lack the `shard.yml` file when compiling
|
||||||
# Invidious.
|
# Invidious.
|
||||||
{% if !flag?(:skip_version_check) %}
|
{% if !flag?(:skip_version_check) %}
|
||||||
{% shard_yml = read_file("shard.yml") %}
|
{% if file_exists?("#{__DIR__}/../shard.yml") %}
|
||||||
|
{% shard_yml = read_file("#{__DIR__}/../shard.yml") %}
|
||||||
{% crystal_constraint = shard_yml.split('\n').find(&.starts_with?("crystal:")) %}
|
{% crystal_constraint = shard_yml.split('\n').find(&.starts_with?("crystal:")) %}
|
||||||
{% minimum_version = crystal_constraint.split('"')[1].split(",").first.split(">=").last.strip %}
|
{% minimum_version = crystal_constraint.split('"')[1].split(",").first.split(">=").last.strip %}
|
||||||
{% if compare_versions(Crystal::VERSION, minimum_version) < 0 %}
|
{% if compare_versions(Crystal::VERSION, minimum_version) < 0 %}
|
||||||
@ -68,6 +69,7 @@ require "./invidious/jobs/*"
|
|||||||
{% end %}
|
{% end %}
|
||||||
{% end %}
|
{% end %}
|
||||||
{% end %}
|
{% end %}
|
||||||
|
{% end %}
|
||||||
|
|
||||||
# Declare the base namespace for invidious
|
# Declare the base namespace for invidious
|
||||||
module Invidious
|
module Invidious
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user