Skip to content

Commit 0c7726d

Browse files
committed
Update/create versions.yml after dep installation
1 parent 1f1e14f commit 0c7726d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

scripts/fetch-player-dependencies.cr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,18 +57,15 @@ required_dependencies.keys.each do |dep|
5757
# Check for missing dependencies
5858
if !Dir.exists?(path)
5959
Dir.mkdir(path)
60-
61-
update_versions_yaml(required_dependencies, minified, dep)
6260
dependencies_to_install << dep
6361
else
6462
config = File.open("#{path}/versions.yml") do |file|
6563
YAML.parse(file).as_h
6664
end
6765

6866
if config["version"].as_s != required_dependencies[dep]["version"].as_s || config["minified"].as_bool != minified
69-
`rm -rf #{path}/*`
67+
`rm -rf #{path}/*.js #{path}/*.css`
7068
dependencies_to_install << dep
71-
update_versions_yaml(required_dependencies, minified, dep)
7269
end
7370
end
7471
end
@@ -139,6 +136,9 @@ dependencies_to_install.each do |dep|
139136
end
140137
end
141138

139+
# Update/create versions file for the dependency
140+
update_versions_yaml(required_dependencies, minified, dep_name)
141+
142142
channel.send(dep_name)
143143
rescue ex
144144
channel.send(ex)

0 commit comments

Comments
 (0)