5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-16 10:51:42 +00:00

feat: tener en cuenta las dependencias suaves al armar el grafo

This commit is contained in:
f 2023-03-27 14:52:37 -03:00
parent b2c6d40b0f
commit ad0d7aac10
3 changed files with 9 additions and 4 deletions

View file

@ -100,6 +100,13 @@ class Deploy < ApplicationRecord
@local_env ||= {}
end
# Trae todas las dependencias
#
# @return [Array]
def self.all_dependencies
self::DEPENDENCIES | self::SOFT_DEPENDENCIES
end
private
# @param [String]

View file

@ -5,9 +5,7 @@ class DeployFullRsync < DeployRsync
deploy_alternative_domain
deploy_localized_domain
deploy_hidden_service
deploy_local
deploy_www
deploy_zip
]
# Sincroniza las ubicaciones alternativas también, ignorando las que
@ -18,7 +16,7 @@ class DeployFullRsync < DeployRsync
# @return [Boolean]
def rsync(output: false)
result =
SOFT_DEPENDENCIES.map(&:to_s).map(&:classify).map do |dependency|
self.class.all_dependencies.map(&:to_s).map(&:classify).map do |dependency|
site.deploys.where(type: dependency).find_each.map do |deploy|
next unless File.exist? deploy.destination

View file

@ -18,7 +18,7 @@ class Site
end
deploys.each do |deploy|
deploy.class::DEPENDENCIES.each do |dependency|
deploy.class.all_dependencies.each do |dependency|
deploys.where(type: dependency.to_s.classify).each do |deploy_dependency|
graph.add_edge deploy_dependency, deploy
end