mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-16 18:56:21 +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
|
raise NotImplementedError
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Realizar tareas de limpieza.
|
||||||
|
def cleanup!; end
|
||||||
|
|
||||||
def time_start
|
def time_start
|
||||||
@start = Time.now
|
@start = Time.now
|
||||||
end
|
end
|
||||||
|
|
|
@ -43,6 +43,17 @@ class DeployLocal < Deploy
|
||||||
File.join(Rails.root, '_deploy', site.hostname)
|
File.join(Rails.root, '_deploy', site.hostname)
|
||||||
end
|
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
|
private
|
||||||
|
|
||||||
def mkdir
|
def mkdir
|
||||||
|
|
Loading…
Reference in a new issue