mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-16 16:31:41 +00:00
cada deploy puede ejecutar tareas de limpieza
pero la mayoría no lo va a necesitar
This commit is contained in:
parent
9dee10bcb9
commit
78c0bdcc39
2 changed files with 14 additions and 0 deletions
|
@ -23,6 +23,9 @@ class Deploy < ApplicationRecord
|
|||
raise NotImplementedError
|
||||
end
|
||||
|
||||
# Realizar tareas de limpieza.
|
||||
def cleanup!; end
|
||||
|
||||
def time_start
|
||||
@start = Time.now
|
||||
end
|
||||
|
|
|
@ -43,6 +43,17 @@ class DeployLocal < Deploy
|
|||
File.join(Rails.root, '_deploy', site.hostname)
|
||||
end
|
||||
|
||||
# Libera espacio eliminando archivos temporales
|
||||
#
|
||||
# @return [nil]
|
||||
def cleanup!
|
||||
FileUtils.rm_rf(gems_dir)
|
||||
FileUtils.rm_rf(yarn_cache_dir)
|
||||
FileUtils.rm_rf(File.join(site.path, 'node_modules'))
|
||||
FileUtils.rm_rf(File.join(site.path, '.sass-cache'))
|
||||
FileUtils.rm_rf(File.join(site.path, '.jekyll-cache'))
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def mkdir
|
||||
|
|
Loading…
Reference in a new issue