Friday, February 8, 2013

Git submodule for behaviors/components/helpers

I wish to add a behavior (for example Finite state machine) to a project.

I would like to use Git submodule functionality, but it seems impossible due to repo folder structure.

If I do (example):
/project/$ git clone url-to-repo app/Model/Behavior/StateMachine

I would end up with /project/app/Model/Behavior/StateMachine/Model/Behavior/StateMachineBehavior.php

Checking out the repo as a plugin might work?

   /project/$ git submodule add url-to-repo app/Plugin/StateMachine

   and then init the behavior as $actsAs => "StateMachine.StateMachine"

But I'm not sure if this is good practice...


How would you guys do this?

(The same goes for Components and Helpers)

P.S.: I know that it's easier to just download the file and put it in app/Behaviors, but I am making a deployment version for many different projects and it's crucial to be able to checkout updates later via git.

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments: