mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-03-16.git
synced 2024-08-15 00:53:18 +00:00
Update/create versions.yml after dep installation
This commit is contained in:
parent
1f1e14fba5
commit
0c7726d4e1
1 changed files with 4 additions and 4 deletions
|
@ -57,8 +57,6 @@ required_dependencies.keys.each do |dep|
|
||||||
# Check for missing dependencies
|
# Check for missing dependencies
|
||||||
if !Dir.exists?(path)
|
if !Dir.exists?(path)
|
||||||
Dir.mkdir(path)
|
Dir.mkdir(path)
|
||||||
|
|
||||||
update_versions_yaml(required_dependencies, minified, dep)
|
|
||||||
dependencies_to_install << dep
|
dependencies_to_install << dep
|
||||||
else
|
else
|
||||||
config = File.open("#{path}/versions.yml") do |file|
|
config = File.open("#{path}/versions.yml") do |file|
|
||||||
|
@ -66,9 +64,8 @@ required_dependencies.keys.each do |dep|
|
||||||
end
|
end
|
||||||
|
|
||||||
if config["version"].as_s != required_dependencies[dep]["version"].as_s || config["minified"].as_bool != minified
|
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
|
dependencies_to_install << dep
|
||||||
update_versions_yaml(required_dependencies, minified, dep)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -139,6 +136,9 @@ dependencies_to_install.each do |dep|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Update/create versions file for the dependency
|
||||||
|
update_versions_yaml(required_dependencies, minified, dep_name)
|
||||||
|
|
||||||
channel.send(dep_name)
|
channel.send(dep_name)
|
||||||
rescue ex
|
rescue ex
|
||||||
channel.send(ex)
|
channel.send(ex)
|
||||||
|
|
Loading…
Reference in a new issue