5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-15 19:21:45 +00:00

fix: permite instalar gemas por primera vez #13428
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
f 2023-05-13 17:48:06 -03:00
parent 5d8c1556a8
commit dc20e4c9ce
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