5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-23 06:56:22 +00:00

Merge branch 'issue-10464' into panel.sutty.nl
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
f 2023-03-31 14:50:10 -03:00
commit 9e13cb5bcb

View file

@ -52,11 +52,13 @@ class DeployDistributedPress < Deploy
end end
end end
self.remote_info[:distributed_press] = c.show(publishing_site).to_h
save
status = c.publish(publishing_site, deploy_local.destination) status = c.publish(publishing_site, deploy_local.destination)
if status
self.remote_info[:distributed_press] = c.show(publishing_site).to_h
save
end
publisher.logger.close publisher.logger.close
stdout.join stdout.join
end end
@ -78,6 +80,12 @@ class DeployDistributedPress < Deploy
# Devuelve las URLs de todos los protocolos # Devuelve las URLs de todos los protocolos
def urls def urls
protocol_urls + gateway_urls
end
private
def gateway_urls
remote_info.dig(:distributed_press, :links).values.map do |protocol| remote_info.dig(:distributed_press, :links).values.map do |protocol|
[ protocol[:link], protocol[:gateway] ] [ protocol[:link], protocol[:gateway] ]
end.flatten.compact.select do |link| end.flatten.compact.select do |link|
@ -85,7 +93,13 @@ class DeployDistributedPress < Deploy
end end
end end
private def protocol_urls
remote_info.dig(:distributed_press, :protocols).select do |_, enabled|
enabled
end.map do |protocol, _|
"#{protocol}://#{site.hostname}"
end
end
# El cliente de la API # El cliente de la API
# #