mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-23 07:46:21 +00:00
Merge branch 'issue-10464' into panel.sutty.nl
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
commit
9e13cb5bcb
1 changed files with 18 additions and 4 deletions
|
@ -52,10 +52,12 @@ class DeployDistributedPress < Deploy
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
status = c.publish(publishing_site, deploy_local.destination)
|
||||||
|
|
||||||
|
if status
|
||||||
self.remote_info[:distributed_press] = c.show(publishing_site).to_h
|
self.remote_info[:distributed_press] = c.show(publishing_site).to_h
|
||||||
save
|
save
|
||||||
|
end
|
||||||
status = c.publish(publishing_site, deploy_local.destination)
|
|
||||||
|
|
||||||
publisher.logger.close
|
publisher.logger.close
|
||||||
stdout.join
|
stdout.join
|
||||||
|
@ -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
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in a new issue