On Wed, Dec 31, 2008 at 10:54 PM, Nate Turnage <[email protected]> wrote:

> Andrew was kind enough to document for me how to use a local branch of a
> git-cloned extension in a project. Sean was kind enough to explain how to
> set up extensions as submodules in a git-managed project. I have one more
> question related to git, submodules and extensions. Is it possible to create
> and use a local branch of an extension when it is included as a submodule? I
> just want to ask before I start on something that isn't possible (or the
> correct way to do things).
>


I just want to add that I found an answer for my question here just in case
anyone wants to know or needs to know.

If you add your extensions as git submodules and you want to use an earlier
commit of that extension, what you have to do is set up a run line in the
after_deploy area of your deploy.rb file. For instance, your project is
managed using git, you are using Radiant 0.6.9 and you want to use the
page_attachments extension. Well, the page_attachements extension broke
compatibility with 0.6.9 a few commits back, so you would have to put
something similar to this in your after_deploy task in your Capistrano
deployment recipe:

run "cd
~/[name_of_your_application_on_server]/current/vendor/extensions/page_attachments;git
checkout f07ba4;cd ../../..;git add ."

1. This will git checkout commit f07ba4, which is the last version of
page_attchments that works with Radiant 0.6.9.
2. cd to the root of your project.
3. git add the changed file (.gitmodules) to your project so that it will
use the new (old) version

When I started out with git on this project I was a git virgin so there
might be a better/easier way to do this, but after many rounds with tech
support at Rails Playground and many (many, many) google searches and the
git book from Pragmatic, this is what I used to make use of previous commits
of the page_attachments and copy_move extensions.

FYI, I used commit SHAs to reference the versions I used because the
extension creators, both of them, failed to tag their extensions for pre-0.7
versions of Radiant. Thanks, guys.

When things slow down for me, probably February, I will be contributing some
of my processes on this and some of the other "workarounds" I have made to
get projects working correctly using Radiant with available extensions. Some
of that will cover git info for noobs (like I was), the template extension,
subscriber lists and probably something on mailer. So I am in for the
"Spring Continuum" ongoing documentation project.


Cheers,

Nate
_______________________________________________
Radiant mailing list
Post:   [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to