mirror of
https://github.com/Oreolek/kohana-migrations.git
synced 2024-06-16 15:01:08 +03:00
Added binary file for easier interaction with minion
This commit is contained in:
parent
19096e5901
commit
65230921c6
20
README.md
20
README.md
|
@ -11,7 +11,7 @@ The system is inspired by ruckusing, which had a nice system for defining tasks
|
|||
|
||||
## Requirements
|
||||
|
||||
* [kohana-database](https://github.com/kohana/database)
|
||||
* [kohana-database](https://github.com/kohana/database) is required by the migration tasks
|
||||
|
||||
## Compatibility
|
||||
|
||||
|
@ -21,21 +21,29 @@ Minion should be compatible with both Kohana 3.0.x and 3.1.x
|
|||
|
||||
First off, download and enable the module in your bootstrap
|
||||
|
||||
Then you can run minion like so:
|
||||
Then copy the binary `minion` into your webroot (i.e. the folder where index.php is, edit the binary if you want to store it in a different location)
|
||||
|
||||
php index.php --uri=minion/{task}
|
||||
You can then run minion like so:
|
||||
|
||||
To view a list of minion tasks, run
|
||||
./minion {task}
|
||||
|
||||
php index.php --uri=minion/help
|
||||
To view a list of minion tasks, run minion without any parameters, or with the `--help` option
|
||||
|
||||
./minon
|
||||
./minion --help
|
||||
|
||||
To view help for a specific minion task run
|
||||
|
||||
php index.php --uri=minion/help/{task}
|
||||
./minion {task} --help
|
||||
|
||||
For security reasons Minion will only run from the cli. Attempting to access it over http will cause
|
||||
a `Kohana_Exception` to be thrown.
|
||||
|
||||
If you're unable to use the binary file for whatever reason then simply replace `./minion {task}` in the above
|
||||
examples with
|
||||
|
||||
php index.php --uri=minion --task={task}
|
||||
|
||||
## Writing your own tasks
|
||||
|
||||
All minion tasks must be located in `classes/minion/task/`. They can be in any module, thus allowing you to
|
||||
|
|
23
minion
Executable file
23
minion
Executable file
|
@ -0,0 +1,23 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Usage: ./minion [task:name] [--option1=optval1 --option2=optval2]
|
||||
#
|
||||
# And so on.
|
||||
#
|
||||
# To get help, pass in --help
|
||||
#
|
||||
# # Minion general help
|
||||
# ./minion --help
|
||||
# ./minion
|
||||
#
|
||||
# # Task specific help
|
||||
# ./minion task:name --help
|
||||
#
|
||||
|
||||
if [[ $# > 1 && $1 != --* ]]
|
||||
then
|
||||
TASK="--task=$1"
|
||||
shift 1
|
||||
fi
|
||||
|
||||
php index.php $TASK $@
|
Loading…
Reference in a new issue