mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-16 07:01:42 +00:00
fix: no usar :send #13428
This commit is contained in:
parent
622d3b47db
commit
310bd31710
2 changed files with 20 additions and 16 deletions
|
@ -7,6 +7,18 @@ class DeployLocal < Deploy
|
||||||
|
|
||||||
before_destroy :remove_destination!
|
before_destroy :remove_destination!
|
||||||
|
|
||||||
|
def git_lfs(output: false)
|
||||||
|
run %(git lfs fetch), output: output
|
||||||
|
run %(git lfs checkout), output: output
|
||||||
|
end
|
||||||
|
|
||||||
|
def bundle(output: false)
|
||||||
|
# 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
|
||||||
|
end
|
||||||
|
|
||||||
# Realizamos la construcción del sitio usando Jekyll y un entorno
|
# Realizamos la construcción del sitio usando Jekyll y un entorno
|
||||||
# limpio para no pasarle secretos
|
# limpio para no pasarle secretos
|
||||||
#
|
#
|
||||||
|
@ -114,9 +126,11 @@ class DeployLocal < Deploy
|
||||||
File.exist? pnpm_lock
|
File.exist? pnpm_lock
|
||||||
end
|
end
|
||||||
|
|
||||||
def git_lfs(output: false)
|
def pnpm(output: false)
|
||||||
run %(git lfs fetch), output: output
|
return true unless pnpm_lock?
|
||||||
run %(git lfs checkout), output: output
|
|
||||||
|
run %(pnpm config set store-dir "#{pnpm_cache_dir}"), output: output
|
||||||
|
run 'pnpm install --production', output: output
|
||||||
end
|
end
|
||||||
|
|
||||||
def gem(output: false)
|
def gem(output: false)
|
||||||
|
@ -130,17 +144,6 @@ class DeployLocal < Deploy
|
||||||
run 'yarn install --production', output: output
|
run 'yarn install --production', output: output
|
||||||
end
|
end
|
||||||
|
|
||||||
def pnpm(output: false)
|
|
||||||
return true unless pnpm_lock?
|
|
||||||
|
|
||||||
run %(pnpm config set store-dir "#{pnpm_cache_dir}"), output: output
|
|
||||||
run 'pnpm install --production', output: output
|
|
||||||
end
|
|
||||||
|
|
||||||
def bundle(output: false)
|
|
||||||
run %(bundle install --deployment --no-cache --path="#{site.bundle_path}" --clean --without test development), output: output
|
|
||||||
end
|
|
||||||
|
|
||||||
def jekyll_build(output: false)
|
def jekyll_build(output: false)
|
||||||
run %(bundle exec jekyll build --trace --profile --destination "#{escaped_destination}"), output: output
|
run %(bundle exec jekyll build --trace --profile --destination "#{escaped_destination}"), output: output
|
||||||
end
|
end
|
||||||
|
|
|
@ -558,10 +558,11 @@ class Site < ApplicationRecord
|
||||||
def install_gems
|
def install_gems
|
||||||
return unless persisted?
|
return unless persisted?
|
||||||
|
|
||||||
deploys.find_by_type('DeployLocal').send(:git_lfs)
|
deploy_local = deploys.find_by_type('DeployLocal')
|
||||||
|
deploy_local.git_lfs
|
||||||
|
|
||||||
if !gem_dir? || gemfile_updated? || gemfile_lock_updated?
|
if !gem_dir? || gemfile_updated? || gemfile_lock_updated?
|
||||||
deploys.find_by_type('DeployLocal').send(:bundle)
|
deploy_local.bundle
|
||||||
touch
|
touch
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue