From 8ba5a19db2e180a303ab5df9af2012574d5b26a3 Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Thu, 17 Jul 2008 23:36:34 +0200 Subject: [PATCH] added the missing fabfile (gnabber) --HG-- branch : trunk --- fabfile.py | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 fabfile.py diff --git a/fabfile.py b/fabfile.py new file mode 100644 index 0000000..4c16cd0 --- /dev/null +++ b/fabfile.py @@ -0,0 +1,40 @@ +# -*- coding: utf-8 -*- +""" + Jinja fabfile + ~~~~~~~~~~~~~ + + Shortcuts for various tasks. + + :copyright: Copyright 2008 by Armin Ronacher. + :license: BSD. +""" + + +def test(): + """Run the testsuite.""" + local("cd tests; py.test") + + +def pylint(): + """Run pylint.""" + local("pylint --rcfile scripts/pylintrc jinja") + + +def release(**kwargs): + """Release, tag and upload Jinja2 to the Cheeseshop.""" + import re + _version_re = re.compile(r'VERSION\s*=\s["\'](.*?)["\']') + f = file("setup.py") + try: + for line in f: + match = _version_re.match(line) + if match is not None: + version = match.group(1) + break + else: + raise RuntimeError('no version def in setup.py :-/') + finally: + f.close() + + local('hg tag -m "%s" "%s"' % ('tagged %r' % version, version)) + local('python setup.py release sdist upload') -- 2.26.2