Incluir cakephp como un submodulo de GIT.

1. Crear una nueva instalación de cake (cake 2.0 edge en este caso):

1
2
3
4
cd /path/to/project/repo
git clone git://github.com/cakephp/cakephp.git server
cd server
git checkout origin/2.0

2. Borrar la carpeta y el repositorio de cake y agregarlos de nuevo como sudmodulo:

1
2
3
4
5
6
7
8
rm -rf lib
rm -rf .git
rm .gitignore
git commit -m "Estructura de directorios para la nueva app basada en cake 2.0"
cd ..
git submodule add git://github.com/cakephp/cakephp.git server/cake20
cd server/cake20
git checkout origin/2.0

3. Configure cake para que entienda la nueva estructura de directorios.

1
2
3
cd server/cake20
rm -rf app
ln -s ../app ./app

Cambie esta línea en app/webroot/index.php y en /app/webroot/test.php:

1
define('CAKE_CORE_INCLUDE_PATH', ROOT . DS . 'cake20' . DS . 'lib');

4. Listo! Guarde sus cambios:

1
git commit -m "Configuración base de cakephp"

5. Ñapa: Un .gitignore mas sensible:

1
2
3
4
5
6
7
8
9
server/app/tmp
!server/app/tmp/cache/models/empty
!server/app/tmp/cache/persistent/empty
!server/app/tmp/cache/views/empty
!server/app/tmp/logs/empty
!server/app/tmp/sessions/empty
!server/app/tmp/tests/empty
server/app/Config/database.php
server/app/Config/passwords.php

6. Para después clonar el repo y que todo funcione:

1
2
3
4
5
6
7
cd /path/to/project
git clone http://url/del/repo.git repo
cd repo
git submodule init
git submodule update
cd server/cake2.0
ln -s ./app ../app

3 thoughts on “Incluir cakephp como un submodulo de GIT.

  1. I'm amazed, I have to admit. Seldom do I encounter a
    blog that's equally educative and interesting, and let me tell you,
    you've hit thhe nail on the head. The problem is something
    which not enough people are speaming intelligently about.
    I am very happy thuat I stumbled across this during my huhnt for solmething regarding
    this.

  2. We are a bunch of volunteers and opening a new scheme in our community.
    Your site offered us with helpful info to work on. You have done an impressive
    activity and our entire group will likely be thankful to you.

Deja un comentario

Tu dirección de correo electrónico no será publicada. Los campos necesarios están marcados *

*

Puedes usar las siguientes etiquetas y atributos HTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>