5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-26 12:26:22 +00:00

Merge branch 'deploy-rsync' into panel.sutty.nl

This commit is contained in:
f 2022-04-06 20:54:54 -03:00
commit 8be5719dbd
2 changed files with 11 additions and 9 deletions

View file

@ -32,6 +32,7 @@ class DeployLocal < Deploy
# Obtener el tamaño de todos los archivos y directorios (los # Obtener el tamaño de todos los archivos y directorios (los
# directorios son archivos :) # directorios son archivos :)
def size def size
@size ||= begin
paths = [destination, File.join(destination, '**', '**')] paths = [destination, File.join(destination, '**', '**')]
Dir.glob(paths).map do |file| Dir.glob(paths).map do |file|
@ -42,6 +43,7 @@ class DeployLocal < Deploy
end end
end.inject(:+) end.inject(:+)
end end
end
def destination def destination
File.join(Rails.root, '_deploy', site.hostname) File.join(Rails.root, '_deploy', site.hostname)

View file

@ -13,7 +13,7 @@ class DeployRsync < Deploy
# #
# @return [Integer] # @return [Integer]
def size def size
deploy_local.build_stats.last.size deploy_local.size
end end
# Devolver el destino o lanzar un error si no está configurado # Devolver el destino o lanzar un error si no está configurado