-
Notifications
You must be signed in to change notification settings - Fork 3
Getting started with usher
This is a HOWTO guide to getting started with the Usher task execution system.
-
Download the latest Usher code from https://github.com/enygma/usher
-
Included in the release is a sample configuration file with some basic tasks (
config.json-dist
). You'll either need to copy this example over toconfig.json
or create a new file. Here's the basic structure of a configuration file:
{
"project" : {
"name" : "My Test Project",
"author" : "Chris Cornutt",
"projectBase" : "/tmp/projectbase",
"tasks" : [
]
}
}
The first "project" section provides Usher with some metadata about your current build including the base project path it needs to work with. This base path is considered the "working directory" for several of the tasks.
The "tasks" section is a set of Tasks (from Lib\Task) that do the actual work. You can find some documentation about the current task list here. Here's a few examples:
Creating an internal variable:
{
"type" : "internal.param",
"value": "git://github.com/enygma/usher.git",
"name" : "gitrepo"
}
Building a phar archive:
{
"type" : "package.phar",
"target" : "/tmp/test.phar",
"sourceDirectory" : "/tmp/sampleapp",
"stubFile" : "index.php"
}
One you've defined your config.json
file, you can execute the build by calling the usher
command:
./usher
This, in turn, looks for PHP and calls usher.php
with it. It will read the config.json
file from the local directory and execute each of the tasks.