Welcome Guest, Not a member yet? Register   Sign In
SVN help needed - Creating a master CI Kit that all my sites will use
#1

[eluser]skattabrain[/eluser]
I posted earlier in the lounge, but it's probably not the right place.

I'm creating a "CI Starter Kit" for my personal/client projects. Basically, it's the latest version of CI, some baseline configuration and a set of controllers and libraries that help me in things I need almost all the time ... aka - Authentication/user Management, Basic CMS, Blog ... things like that.

The goal is ... when I start a new client site, I create a new repository for it, then I install this starter kit and use it as the base, then I add the projects unique assets ... like the css, javascripts, icons, site pages, design, etc. So when I decide to add captcha capability to my clients site, I go back to the starter kit, code the functionality in, then pull the update into all the sites running the kit. So i code once, but all my sites get the new code.

I tried using SVN externals, but when I pull in the starter kit, it obviously now has, for example, the applications directory. When I try to create the projects unique files, SVN won't let me, at least not in the applications directory.

So what is the best way to put this together? I'm on windows btw - I read about symlinks but that's not going to help me out.

Thanks for your input!
#2

[eluser]Cro_Crx[/eluser]
what SVN client are you using? TortoiseSVN? If you're not, go get it Smile http://tortoisesvn.tigris.org/
#3

[eluser]skattabrain[/eluser]
oh yeah ... i do use tortoise. i know how to create repos and use svn ... my question is, how can i streamline my process so my client's repos, can pull in the starter kit repo ... and also be able to keep them updated later.
#4

[eluser]Johan André[/eluser]
This is how I do it. There might be better ways to do it though.

1. Create the repository

I use xp-dev.com which is free and it is by default non-public (unlike googlecode). Anything you might get your hands on will do I think. You can ofcourse create a local repository too, but I like to have a online one if my computer crashes...

2. Bring in the Codeigniter system directory

Add an external link to the Codeigniter repository (targeting the system-folder) and place it your repository root.

3. Create the application-directory

The can be done in various ways. I usually export the folder from the system-folder and place it in the root (next to the system-folder). The reason to do an export is because if you copy the folder the folder will still be under svn-control and there will be errors.

Add the exported directory to the repository. I usually name the application-folder "app".

4. Create the index.php file

I usually just copy the index.php from a downloaded copy of CI and add it to the repository. Don't forget to change the $application_folder to "../app" (or whatever you named your application directory.

5. Add an assets directory and subdirectories

I create the following structure to store javascript, images, css and stuff:

Code:
assets
    cache
    css
    images
    js

The cache is for storing combined js and css-files (I use the Carabiner-library).
I also set up the svn to ignore files in the cache-folder since you usually don't need to version-control them. You might also want to ignore directories that holds user-uploaded content to keep the svn clean.

The final structure will look like:

Code:
app
assets
    cache (contents ignored by svn)
    css
    images
    js
index.php
system (via external, updated from CI-repo)

Hope this helps you. I setup almost all my projects using this method.

Good luck!
#5

[eluser]skattabrain[/eluser]
ok, i think you answered me in your use of export. that is the issue i'm running into ... externals loaded in can't then be a part of the new project repo. am i saying that correctly?

whenever i try ... i get locking errors, seem si'm trying to do something svn doesn't do ... at least how i was trying.
#6

[eluser]Johan André[/eluser]
No, I don't think they can.
#7

[eluser]skattabrain[/eluser]
ok, so basically ... when i upgrade that initial project and i want to apply the changes to all my applicable site ... i will not be doing an 'upgrade', rather i will export the initial project and copy it over too the others.




Theme © iAndrew 2016 - Forum software by © MyBB