mirror of
https://0xacab.org/sutty/sutty
synced 2025-02-22 13:51:46 +00:00
fix: permite instalar gemas por primera vez #13428
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
This commit is contained in:
parent
5d8c1556a8
commit
dc20e4c9ce
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
|
# XXX: Desde que ya no compartimos el directorio de gemas, tenemos
|
||||||
# que hacer limpieza después de instalar.
|
# 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
|
end
|
||||||
|
|
||||||
# Realizamos la construcción del sitio usando Jekyll y un entorno
|
# 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)
|
@bundle_path ||= Rails.root.join('_storage', 'gems', name)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def gemfile_lock_path?
|
||||||
|
File.exist? gemfile_lock_path
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
# Asegurarse que el sitio tenga una llave privada
|
# Asegurarse que el sitio tenga una llave privada
|
||||||
|
@ -594,7 +598,7 @@ class Site < ApplicationRecord
|
||||||
|
|
||||||
# Detecta si el Gemfile.lock fue modificado
|
# Detecta si el Gemfile.lock fue modificado
|
||||||
def gemfile_lock_updated?
|
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)
|
updated_at < File.mtime(gemfile_lock_path)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue