mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-19 16:36:22 +00:00
fix: permite instalar gemas por primera vez #13428
This commit is contained in:
parent
a8f93b29e1
commit
a4fd8bcc85
2 changed files with 6 additions and 2 deletions
|
@ -16,7 +16,7 @@ class DeployLocal < Deploy
|
|||
# XXX: Desde que ya no compartimos el directorio de gemas, tenemos
|
||||
# que hacer limpieza después de instalar.
|
||||
|
||||
run %(bundle install --deployment --no-cache --path="#{site.bundle_path}" --clean --without test development), output: output
|
||||
run %(bundle install #{'--deployment' if site.gemfile_lock_path?} --no-cache --path="#{site.bundle_path}" --clean --without test development), output: output
|
||||
end
|
||||
|
||||
# Realizamos la construcción del sitio usando Jekyll y un entorno
|
||||
|
|
|
@ -458,6 +458,10 @@ class Site < ApplicationRecord
|
|||
@bundle_path ||= Rails.root.join('_storage', 'gems', name)
|
||||
end
|
||||
|
||||
def gemfile_lock_path?
|
||||
File.exist? gemfile_lock_path
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
# Asegurarse que el sitio tenga una llave privada
|
||||
|
@ -594,7 +598,7 @@ class Site < ApplicationRecord
|
|||
|
||||
# Detecta si el Gemfile.lock fue modificado
|
||||
def gemfile_lock_updated?
|
||||
return false unless File.exist? gemfile_lock_path
|
||||
return false unless gemfile_lock_path?
|
||||
|
||||
updated_at < File.mtime(gemfile_lock_path)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue