el directorio base es el sitio mismo

This commit is contained in:
f 2019-09-19 10:20:27 -03:00
parent cd6f13eff4
commit 5799ad9a97
No known key found for this signature in database
GPG key ID: 2AE5A13E321F953D
2 changed files with 14 additions and 2 deletions

View file

@ -35,6 +35,14 @@ class Deploy < ApplicationRecord
(@stop - @start).round(3)
end
def home_dir
site.path
end
def gems_dir
Pathname.new(File.join(home_dir, '..', 'gems')).realpath.to_s
end
# Corre un comando y devuelve true si terminó correctamente
# rubocop:disable Metrics/MethodLength
# rubocop:disable Metrics/AbcSize

View file

@ -43,7 +43,11 @@ class DeployLocal < Deploy
# XXX: This doesn't support Windows paths :B
paths = [File.dirname(`which bundle`), '/usr/bin']
{ 'PATH' => paths.join(':'), 'JEKYLL_ENV' => 'production' }
{
'HOME' => home_dir,
'PATH' => paths.join(':'),
'JEKYLL_ENV' => 'production'
}
end
def yarn_lock
@ -62,7 +66,7 @@ class DeployLocal < Deploy
end
def bundle
run 'bundle install --path=../gems'
run %(bundle install --path="#{gems_dir}")
end
def jekyll_build