Skip to content
Myr

fabfile.py

This file

Path

fabfile.py

40 lines · 924 bytes · Python

Last changed by

added the missing fabfile (gnabber)Armin Ronacherbefore adoption8ba5a19

History of this file

Take it

1# -*- coding: utf-8 -*-2"""3    Jinja fabfile4    ~~~~~~~~~~~~~56    Shortcuts for various tasks.78    :copyright: Copyright 2008 by Armin Ronacher.9    :license: BSD.10"""111213def test():14    """Run the testsuite."""15    local("cd tests; py.test")161718def pylint():19    """Run pylint."""20    local("pylint --rcfile scripts/pylintrc jinja")212223def release(**kwargs):24    """Release, tag and upload Jinja2 to the Cheeseshop."""25    import re26    _version_re = re.compile(r'VERSION\s*=\s["\'](.*?)["\']')27    f = file("setup.py")28    try:29        for line in f:30            match = _version_re.match(line)31            if match is not None:32                version = match.group(1)33                break34        else:35            raise RuntimeError('no version def in setup.py :-/')36    finally:37        f.close()3839    local('hg tag -m "%s" "%s"' % ('tagged %r' % version, version))40    local('python setup.py release sdist upload')