spree / deployment_service_puppet

BSD 3-Clause "New" or "Revised" License
8 stars 6 forks source link

Why not pre-compile deface overrides in default deploy.rb #13

Open johanb opened 11 years ago

johanb commented 11 years ago

Not necessarily part of this repo, but very strongly related so I figured I'd ask the question here, for reference.

Was it a conscious decision to not precompile deface overrides in the default deploy.rb script offered by the spree deployment services ?

If not, should we add it ?

iloveitaly commented 11 years ago

If this is something that makes sense to have in the master repo, I'll submit a PR. In the meantime, here is the code I use in my deployment:

# deploy.rb

namespace :deface do
  task :precompile do
    # the spree app conditionally disables deface in production based on DEFACE_PRECOMPILE
    run "cd #{release_path} && #{rake} RAILS_ENV=#{rails_env} DEFACE_PRECOMPILE=true deface:precompile" 
  end
end

# production.rb
config.deface.enabled = ENV['DEFACE_PRECOMPILE'] == 'true'
johanb commented 11 years ago

Where can I find that repo?

iloveitaly commented 11 years ago

Which repo? My "master repo" I was referring to this repository... not sure if this is functionality that should be included by default. @BDQ what do you think?

johanb commented 11 years ago

https://github.com/spree/deployment_service_website/blob/master/app/views/add_on/deploys/capistrano.html.erb found it :) ill make a PR if @BDQ thinks its a good idea

BDQ commented 11 years ago

Yeah, I'm fine with adding that.

johanb commented 11 years ago

Alright, I'll whip up a PR tomorrow.

johanb commented 11 years ago

I've opened up a PR for this here: https://github.com/spree/deployment_service_website/pull/1