5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-23 03:26: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,10 +52,12 @@ class DeployDistributedPress < Deploy
end
end
status = c.publish(publishing_site, deploy_local.destination)
if status
self.remote_info[:distributed_press] = c.show(publishing_site).to_h
save
status = c.publish(publishing_site, deploy_local.destination)
end
publisher.logger.close
stdout.join
@ -78,6 +80,12 @@ class DeployDistributedPress < Deploy
# Devuelve las URLs de todos los protocolos
def urls
protocol_urls + gateway_urls
end
private
def gateway_urls
remote_info.dig(:distributed_press, :links).values.map do |protocol|
[ protocol[:link], protocol[:gateway] ]
end.flatten.compact.select do |link|
@ -85,7 +93,13 @@ class DeployDistributedPress < Deploy
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
#