5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-07-01 11:46:07 +00:00

fix: permite instalar gemas por primera vez #13428

This commit is contained in:
f 2023-05-13 17:48:06 -03:00
parent a8f93b29e1
commit a4fd8bcc85
2 changed files with 6 additions and 2 deletions

View file

@ -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

View file

@ -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