Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Dependency manager tool for PHP project
PHP
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
config
example/symfony
lib
test adding Tag as a repo parameter for GitAdapter
.gitignore
README
build.config.php
buildkake

README

Buildkake
---

*** CAUTION: HIGHLY EXPERIMENTAL ***

h1. Introduction
Buildkake is a simple build tool for PHP projects. It is like a very very very simplistic wannabe of Ant for Java, Rebar for Erlang or Leiningen for Clojure.
The idea is to handle versions, dependencies and simple builds. Our projects use more and more plugins, libraries maintained independently; so this maintenance task is critical. 
One problem to solve was to have a better strategy than "git submodule" to deal with dependencies.

h2. Usage
Very simple, you just need a configuration file in the root of your project and launch buildkake like this:
$ cd my_project
$ buildkake build.config.php
...

It will:
* download the different libraries and components according to the config file and put them in the current location.
* if already downloaded, it will check if updates are needed and download them.
* check dependencies according to config file (very simple).
* execute user specific scripts before and after building (like email, growl, symfony pake tasks...).
* handle ignore files for your versioning. 

h2. Configuration
The configuration (for the moment) is a simple php file with an array. It looks like this:
<?php
$config = array(
  "name" => "test",
  "description" => "test project symfony",
  "version" => "0.1",
  "deps" => array(
    "plugins" => array(
      "path" => "plugins",
      "items" => array(
        array("type" => "git", "name" => "asOauthPlugin", "url" => "git@github.com:elboby/asOauthPlugin.git", "branch" => "master")
      )
    ),
    "vendor" => array(
      "path" => "lib/vendor",
      "items" => array(
        array("type" => "svn", "name" => "symfony", "url" => "http://svn.symfony-project.com", "branch" => "tags/RELEASE_1_4_6")
      )
    )
  ),
	"build-command" => "php lib/vendor/symfony/data/bin/symfony generate:project test;"
);

A brief description of the keys:
- "name": Name of the project.
- "description": Description of the project.
- "version": Version of the current project. Used later for dependency checking among Buildkake-built projects.
- "deps": List the folders where the libraries and components should be stored.
- "plugins" and "vendor": Just some identifiers for the folders. It could be anything according to your need.
- "path": Actual path of the folder which will hold the dependencies.
- "items": List of dependencies to stored in this specific folder.
- "build-command": Command to be executed at the end of the build.

In our example, the tool will create 2 folders at the root of the project: 'plugins' and 'lib/vendor'.
It will then clone the plugin asOauthPlugin and export the release 1.4.6 of Symfony. 
Finally it will launch the generate:project task to finalize the project by creating the folder structure according to Symfony.


h2. User configuration


h2. Todos
* Add more adapter (tgz file over internet, mercurial repo, pear, symfony plugins...).
* check PHP extension/library (pecl, pear) are presents.
* Tested only on OSX with PHP5.3.
* Add unit tests via PHPunit.
* Add YAML format support for config file.
Something went wrong with that request. Please try again.