Ticket Details

APP dir, as it's own git repo/submodule

RFC Ticket (closed)

### set app/ dir as a separate git submodule

I have (and im sure others do as well) have my lithium directory in its own ```/var/www/app``` dir where i have all my apps for web development.
so lithium resides at ```/var/www/app/lithium```
All my sites are located in ```/var/www/sites/ where `/var/www/sites/foo``` is the app dir that connects to a central lithium dir. I do this so i can easily setup multiple sites off a single lithium directory. Im sure others do this as well.

#### The issue:
When core is updated, the entire lithium dir is updated including any changes to the ```lithium/app``` dir. So what i think would be great is to have the app dir as it's own plugin/git submodule. This help in multiple ways. My app dir can have a remote repo for APP and whenever changes have been updated i can just git pull those changes into my app. Doing this prevents me from having to go over the commits to check for changes in the app dir and making those changes in my own app.

For example, if i was to run ```git branch -a``` in my APP dir i would have an output similar to this:

{{{
$ git branch -a
* master
  app (points to remotes/rad/master. used for merging to local repo)
  remotes/origin/HEAD -> origin/master
  remotes/origin/master
  remotes/rad/master
}}}

so i would checkout the app branch. pull changes from rad/master, check master back out and merge app back into it, taking any updates the core team has made to the app dir into my own app dir. This prevents some level of headache from having to merge things manually.

The way around this is to have a single lithium dir per app. But it is handy to have a multi-site setup. Also, if APP is a submodule inside the lithium app. when updating core you can still update the submodule. so it is still usable when using it in a single site configuration.

What do you guys thing about this?
on 09.08.10 reported by: luckysmack owned by: nate

Updates

on 09.08.10 by jperras
  • type was changed to rfc
Changing this to an RFC instead of an enhancement.

The idea of having the `app` directory as a submodule is a very interesting one, and I think you present some good use cases.

As a sidenote: we do have the `li3 library extract` command that creates a skeleton application for you out of a phar archive. You can give it a path to a phar archive of your choosing as well (which you can create from a modified app directory).
on 02.13.11 by LancerForHire
I have been looking for something like this! :)
on 05.24.11 by greut
A solution I've seen on IRC.

{{{
$ git submodule add code@dev.lithify.me:lithium.git _lithium
$ ln -s _lithium/libraries/lithium libraries/lithium
}}}

I don't see the need to migrate `app` into what I'm doing.
(fixed) on 06.07.11 by nate
  • owner was changed to nate
  • status was changed to closed
  • resolution was changed to fixed
We ended up doing the core as its own submodule instead, as I think that makes a bit more sense. You can check that out here:

 - https://github.com/UnionOfRAD/lithium
 - https://github.com/UnionOfRAD/framework