A specification and parser for project build configuration.
pip install buildparser
git clone git://github.com/brettlangdon/buildparser.git
cd ./buildparser
python setup.py install
import buildparser
builds = buildparser.parse("./path/to/project")
for build in builds:
print build.env
print build.before_build
print build.build
print build.after_build
print build.after_success
print build.after_failure
type - stringoptions - mixed__init__(self, type, options)__repr__(self)as_dict(self)as_json(self)as_yaml(self)commands - list__init__(self, commands)__repr__(self)as_dict(self)as_json(self)as_yaml(self)env - Environmentbefore_build - Scriptbuild - Scriptafter_build - Scriptafter_success - Scriptafter_failure - Script__init__(self, env, before_build, build, after_build, after_success, after_failure)__repr__(self)as_dict(self)as_json(self)as_yaml(self)returns: list
Look for an appropriate name file or directory in the directory directory
and parse all possible build configurations found.
parse defaults to looking for the following files:
.build.yml.build.yaml.build.json.build.ini.build.cfgor for the directory .build which contains one or many configuration files
(name doesn't have to be "build").
returns: list
Look for all appropriate files inside of dir_name and parse configurations found.
returns: list
Parse any available build configurations from file_name
returns: list
Parse any available build configurations from file_name as though it was yaml.
returns: list
Parse any available build configurations from file_name as though it was json.
returns: list
Parse any available build configurations from file_name as though it was an ini file.