Commit aa0b982b14668f71d2eafef5f0aeef6923904cd4
1 parent
552a9773
Exists in
master
and in
52 other branches
precompile assets now idempotent
Signed-off-by: Macartur Sousa <macartur.sc@gmail.com> Signed-off-by: Sergio Oliveira <seocam@seocam.com>
Showing
1 changed file
with
7 additions
and
1 deletions
Show diff stats
cookbooks/gitlab/recipes/default.rb
... | ... | @@ -100,8 +100,14 @@ execute 'selinux-gitlab' do |
100 | 100 | end |
101 | 101 | |
102 | 102 | execute 'fix-relative-url-for-assets' do |
103 | + command 'sed -i \'s/# config.relative_url_root = "\/gitlab"/config.relative_url_root = "\/gitlab"/\' /usr/lib/gitlab/config/application.rb' | |
104 | + only_if 'grep -q "# config.relative_url_root" /usr/lib/gitlab/config/application.rb' | |
105 | + notifies :run, 'execute[precompile-assets]' | |
106 | +end | |
107 | + | |
108 | +execute 'precompile-assets' do | |
103 | 109 | user 'git' |
104 | 110 | cwd '/usr/lib/gitlab' |
105 | - command 'sed -i \'s/# config.relative_url_root = "\/gitlab"/config.relative_url_root = "\/gitlab"/\' /usr/lib/gitlab/config/application.rb' | |
106 | 111 | command 'bundle exec rake assets:precompile RAILS_ENV=production' |
112 | + action :nothing | |
107 | 113 | end | ... | ... |