[chef] What are the available methods does deploy_revision have to check the source repo versions?


Chronological Thread 
  • From: Sachin Sagar Rai < >
  • To: chef < >
  • Subject: [chef] What are the available methods does deploy_revision have to check the source repo versions?
  • Date: Wed, 30 May 2012 00:00:28 +0545

Hi Chefellas!


I've deployed a rails 3 app using `deploy_revision` resource with asset compilation is done inside the `before_restart` block and it works fine.

Since it takes too long and though any assets is not changed, it will still do the precompilation.

  before_restart do
    bash "asset_precompile" do
      cwd current_release
      user app[:owner]
      group app[:group]
      code %{
        export RAILS_ENV=#{rails_env}
        bundle exec rake assets:precompile --trace
      }
      action :run
    end
  end


There are several work arounds in capistrano. One of which is https://github.com/capistrano/capistrano/pull/174/files#L1L40

Does the deploy_revision have the following kind of methods which capistrano has?

e.g. `source`, `previous_revision`

So that I could make the asset compilation conditional.

-------------------------------------------
@millisami
~ Sachin Sagar Rai
Ruby on Rails Developer
http://tfm.com.np
http://nepalonrails.tumblr.com
Sent with Sparrow




Archive powered by MHonArc 2.6.16.

§