Skip to content

Commit

Permalink
add newest configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Young King committed Jun 6, 2012
1 parent 6a8eaed commit 7d4b3ed
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
*.pyc
gitrecipe.egg-info/
dist/
build/
*.egg-info
9 changes: 9 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ in configuration. You can use recipe like this: ::
repository = git://example.com/my-git-repo.git
rev = origin/redevlop-branch
as_egg = True
newest = True

Options
-------
Expand All @@ -26,9 +27,17 @@ Options
*as_egg* - Set to True if you want the checkout to be registered as a
development egg in your buildout

*newest* - always download newest repository, default is true.

And you can use buildout's global *offline* configure.

About
-----

This is a fork of ``gitrecipe`` , which doesn't support
the as_egg feature of ``zerokspot.recipe.git`` .

CHANGES
---------

- 0.0.3 add offline/newest configuration.
5 changes: 4 additions & 1 deletion recipe/git/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,11 @@ def __init__(self, buildout, name, options):
raise zc.buildout.UserError('Can not find repository name')
self.options['location'] = os.path.join(buildout['buildout']['parts-directory'], self.repo_path)
self.paths = options.get('paths', None)
if buildout['buildout'].get('offline') == 'true':
if buildout['buildout'].get('offline').lower() == 'true':
self.update = lambda: ()
if self.options.get('newest', 'true').lower() == 'false':
self.install = lambda: ()
self.update = lambda: ()

def git(self, operation, args, quiet=True):
if quiet:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

setup(
name="git-recipe",
version='0.0.2',
version='0.0.3',
description='Simple buildout recipe for downloading git repositories. It uses system git command and its syntax',
author='Young King',
author_email='yanckin@gmail.com',
Expand Down

0 comments on commit 7d4b3ed

Please sign in to comment.