mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-15 01:21:42 +00:00
el directorio base es el sitio mismo
This commit is contained in:
parent
cd6f13eff4
commit
5799ad9a97
2 changed files with 14 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue