mirror of
https://0xacab.org/sutty/sutty
synced 2025-02-21 11:31:49 +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)
|
(@stop - @start).round(3)
|
||||||
end
|
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
|
# Corre un comando y devuelve true si terminó correctamente
|
||||||
# rubocop:disable Metrics/MethodLength
|
# rubocop:disable Metrics/MethodLength
|
||||||
# rubocop:disable Metrics/AbcSize
|
# rubocop:disable Metrics/AbcSize
|
||||||
|
|
|
@ -43,7 +43,11 @@ class DeployLocal < Deploy
|
||||||
# XXX: This doesn't support Windows paths :B
|
# XXX: This doesn't support Windows paths :B
|
||||||
paths = [File.dirname(`which bundle`), '/usr/bin']
|
paths = [File.dirname(`which bundle`), '/usr/bin']
|
||||||
|
|
||||||
{ 'PATH' => paths.join(':'), 'JEKYLL_ENV' => 'production' }
|
{
|
||||||
|
'HOME' => home_dir,
|
||||||
|
'PATH' => paths.join(':'),
|
||||||
|
'JEKYLL_ENV' => 'production'
|
||||||
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
def yarn_lock
|
def yarn_lock
|
||||||
|
@ -62,7 +66,7 @@ class DeployLocal < Deploy
|
||||||
end
|
end
|
||||||
|
|
||||||
def bundle
|
def bundle
|
||||||
run 'bundle install --path=../gems'
|
run %(bundle install --path="#{gems_dir}")
|
||||||
end
|
end
|
||||||
|
|
||||||
def jekyll_build
|
def jekyll_build
|
||||||
|
|
Loading…
Reference in a new issue