diff --git a/fabfile.py b/fabfile.py index 7524f52..c4c72e2 100644 --- a/fabfile.py +++ b/fabfile.py @@ -1,6 +1,7 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- +import os from fabric.api import * @@ -11,6 +12,18 @@ def _run(cmd): local(CMD_TEMPLATE.format(cmd)) +def _path_to(*loc): + path_tree = __file__.split('/')[:-1] + path_tree.extend(loc) + + return '/'.join(path_tree) + + +def docs(): + os.chdir(_path_to('docs')) + os.system('make') + + def prod(): """Runs all command on the production instance.""" global CMD_TEMPLATE