mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-15 23:51:41 +00:00
Merge branch 'issue-13022' into 'rails'
Issue 13022 See merge request sutty/sutty!151
This commit is contained in:
commit
371f8e7593
2 changed files with 8 additions and 0 deletions
|
@ -14,6 +14,7 @@ class DeployLocal < Deploy
|
||||||
# Sutty
|
# Sutty
|
||||||
def deploy(output: false)
|
def deploy(output: false)
|
||||||
return false unless mkdir
|
return false unless mkdir
|
||||||
|
return false unless git_lfs(output: output)
|
||||||
return false unless yarn(output: output)
|
return false unless yarn(output: output)
|
||||||
return false unless pnpm(output: output)
|
return false unless pnpm(output: output)
|
||||||
return false unless bundle(output: output)
|
return false unless bundle(output: output)
|
||||||
|
@ -113,6 +114,11 @@ class DeployLocal < Deploy
|
||||||
File.exist? pnpm_lock
|
File.exist? pnpm_lock
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def git_lfs(output: false)
|
||||||
|
run %(git lfs fetch), output: output
|
||||||
|
run %(git lfs checkout), output: output
|
||||||
|
end
|
||||||
|
|
||||||
def gem(output: false)
|
def gem(output: false)
|
||||||
run %(gem install bundler --no-document), output: output
|
run %(gem install bundler --no-document), output: output
|
||||||
end
|
end
|
||||||
|
|
|
@ -565,6 +565,8 @@ class Site < ApplicationRecord
|
||||||
def install_gems
|
def install_gems
|
||||||
return unless persisted?
|
return unless persisted?
|
||||||
|
|
||||||
|
deploys.find_by_type('DeployLocal').send(: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)
|
deploys.find_by_type('DeployLocal').send(:bundle)
|
||||||
touch
|
touch
|
||||||
|
|
Loading…
Reference in a new issue