Skip to content
This repository has been archived by the owner on May 13, 2020. It is now read-only.

Commit

Permalink
add dry run option
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Groszer committed Jun 11, 2010
1 parent e50a43b commit 5a31b6e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/zope/wineggbuilder/README.txt
Expand Up @@ -23,7 +23,7 @@ Let's see:

>>> import os.path
>>> testininame = os.path.join(os.path.dirname(build.__file__), 'test.ini')
>>> build.main([testininame, '-v'])
>>> build.main([testininame, '-v']) # doctest: +REPORT_NDIFF
INFO - loading configuration from ...zope.wineggbuilder\trunk\src\zope\wineggbuilder\test.ini
INFO - Starting to build
DEBUG - getting http://pypi.python.org/simple/zope.proxy/
Expand Down
7 changes: 6 additions & 1 deletion src/zope/wineggbuilder/base.py
Expand Up @@ -172,4 +172,9 @@ def rmtree(dirname):
parser.add_option(
"-v", "--verbose", action="store_true",
dest="verbose", default=False,
help="When specified, debug information is created.")
help="When specified, debug information is displayed.")

parser.add_option(
"-d", "--dryrun", action="store_true",
dest="dryrun", default=False,
help="When specified, no upload is done.")
4 changes: 4 additions & 0 deletions src/zope/wineggbuilder/build.py
Expand Up @@ -82,6 +82,10 @@ def build(self, package, version, files, sourceFolder):

LOGGER.debug('Running: %s\nIn: %s', self.command, sourceFolder)

if self.options.dryrun:
LOGGER.info("Dry run, no compile and upload")
return

try:
#this ought to build and upload the egg
output = cmd.do(command)
Expand Down

0 comments on commit 5a31b6e

Please sign in to comment.