Skip to content

Commit f73aef3

Browse files
committed
Add compile option to disable fetching of player dependencies
1 parent 170e754 commit f73aef3

File tree

2 files changed

+14
-11
lines changed

2 files changed

+14
-11
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ test:
6262
crystal spec
6363

6464
verify:
65-
crystal build src/invidious.cr --no-codegen --progress --stats --error-trace
65+
crystal build src/invidious.cr -Ddont_fetch_videojs \
66+
--no-codegen --progress --stats --error-trace
6667

6768

6869
# -----------------------

src/invidious.cr

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -114,16 +114,18 @@ LOGGER = Invidious::LogHandler.new(OUTPUT, CONFIG.log_level)
114114
# Check table integrity
115115
Invidious::Database.check_integrity(CONFIG)
116116

117-
# Resolve player dependencies. This is done at compile time.
118-
#
119-
# Running the script by itself would show some colorful feedback while this doesn't.
120-
# Perhaps we should just move the script to runtime in order to get that feedback?
121-
122-
{% puts "\nChecking player dependencies...\n" %}
123-
{% if flag?(:minified_player_dependencies) %}
124-
{% puts run("../scripts/fetch-player-dependencies.cr", "--minified").stringify %}
125-
{% else %}
126-
{% puts run("../scripts/fetch-player-dependencies.cr").stringify %}
117+
{% unless flag?(:dont_fetch_videojs) %}
118+
# Resolve player dependencies. This is done at compile time.
119+
#
120+
# Running the script by itself would show some colorful feedback while this doesn't.
121+
# Perhaps we should just move the script to runtime in order to get that feedback?
122+
123+
{% puts "\nChecking player dependencies...\n" %}
124+
{% if flag?(:minified_player_dependencies) %}
125+
{% puts run("../scripts/fetch-player-dependencies.cr", "--minified").stringify %}
126+
{% else %}
127+
{% puts run("../scripts/fetch-player-dependencies.cr").stringify %}
128+
{% end %}
127129
{% end %}
128130

129131
# Start jobs

0 commit comments

Comments
 (0)