Skip to content
Snippets Groups Projects
Commit c2e54a8a authored by elijah's avatar elijah Committed by Micah
Browse files

auto run bundler when needed for site_static

parent dcce787c
No related branches found
No related tags found
No related merge requests found
......@@ -23,6 +23,19 @@ define site_static::location($path, $format, $source) {
}
}
if ($format == 'rack') {
# Run bundler if there is a Gemfile
exec { 'bundler_update':
cwd => $file_path,
command => '/bin/bash -c "/usr/bin/bundle check --path vendor/bundle || /usr/bin/bundle install --path vendor/bundle --without test development debug"',
unless => '/usr/bin/bundle check --path vendor/bundle',
onlyif => 'test -f Gemfile',
user => 'www-data',
timeout => 600,
require => [Class['bundler::install'], Class['site_config::ruby::dev']];
}
}
vcsrepo { $file_path:
ensure => present,
force => true,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment