From 0c7726d4e1a66e1a1d1761f81951c87adf057fe6 Mon Sep 17 00:00:00 2001 From: syeopite Date: Sat, 2 Oct 2021 06:10:57 -0700 Subject: [PATCH] Update/create versions.yml after dep installation --- scripts/fetch-player-dependencies.cr | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/fetch-player-dependencies.cr b/scripts/fetch-player-dependencies.cr index adfe57ba..ed658b51 100644 --- a/scripts/fetch-player-dependencies.cr +++ b/scripts/fetch-player-dependencies.cr @@ -57,8 +57,6 @@ required_dependencies.keys.each do |dep| # Check for missing dependencies if !Dir.exists?(path) Dir.mkdir(path) - - update_versions_yaml(required_dependencies, minified, dep) dependencies_to_install << dep else config = File.open("#{path}/versions.yml") do |file| @@ -66,9 +64,8 @@ required_dependencies.keys.each do |dep| end if config["version"].as_s != required_dependencies[dep]["version"].as_s || config["minified"].as_bool != minified - `rm -rf #{path}/*` + `rm -rf #{path}/*.js #{path}/*.css` dependencies_to_install << dep - update_versions_yaml(required_dependencies, minified, dep) end end end @@ -139,6 +136,9 @@ dependencies_to_install.each do |dep| end end + # Update/create versions file for the dependency + update_versions_yaml(required_dependencies, minified, dep_name) + channel.send(dep_name) rescue ex channel.send(ex)