Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Update lib/symfony2/symfony.rb #199

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
5 participants
Contributor

vslinko commented Aug 22, 2012

I deploy with dev env and that broke my deploy.

Collaborator

willdurand commented Aug 22, 2012

Can you put this condition in the deploy hook? not in the task itself?

Collaborator

willdurand commented Aug 22, 2012

btw, @cedriclombardot I'm gonna kill you.

Contributor

cedriclombardot commented Aug 22, 2012

If you use multistage you've just to configure set :clear_controllers, falsein preprod.rb

Contributor

vslinko commented Aug 22, 2012

But it's wrong remove dev controller on dev env

Contributor

vslinko commented Aug 23, 2012

How about merge?

Collaborator

willdurand commented Aug 24, 2012

Do you use the multistage ext?

Contributor

vslinko commented Aug 24, 2012

no, i don't. I need?

Collaborator

willdurand commented Aug 28, 2012

I guess yes.

Contributor

vslinko commented Aug 28, 2012

So, what about PR?

Collaborator

willdurand commented Aug 28, 2012

it probably makes sense.

clear_controllers should clear all controllers that are not using the current symfony environment.

Collaborator

willdurand commented Aug 31, 2012

Yes, it could be an idea.

@cedriclombardot could you update your task to use the symfony_env variable?

@rande rande commented on the diff Sep 3, 2012

lib/symfony2.rb
@@ -145,7 +145,7 @@ def remote_command_exists?(command)
symfony.assetic.dump # 5. Dump assetic assets
end
- if clear_controllers
+ if clear_controllers and symfony_env_prod == "prod"
@rande

rande Sep 3, 2012

why prod is hardcoded here ? prod is just a kind of convention ...

@vslinko

vslinko Sep 3, 2012

Contributor
  1. prod is default value
  2. prod is default symfony2 production env
  3. crear_controllers can run only in prod env otherwise its broke deploy
@rande

rande Sep 4, 2012

This does not mean prod is production environment, you can have many production environments depends on the request source

@vslinko

vslinko Sep 4, 2012

Contributor

How I can do it better?

@LouTerrailloune

LouTerrailloune Sep 4, 2012

Remove the check and correct the task.

This version was not to bad:

 try_sudo "for file in #{latest_release}/web/*.php; do grep -HLP \"new AppKernel\\\('prod'\" $file | xargs -I {} rm -f {}; done;"

Except it should use web_path and symfony_env_prod. A better version should be to allow to deploy multiple environment.

Collaborator

willdurand commented Sep 10, 2012

@LouTerrailloune want to write a patch?

Collaborator

willdurand commented Sep 10, 2012

I won't merge this PR. We need to fix the task. #223 could be an alternative.

@willdurand willdurand closed this Sep 10, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment