Skip to content

Commit

Permalink
deploy the same version to all targets
Browse files Browse the repository at this point in the history
  • Loading branch information
Mario Nunes committed Aug 27, 2015
1 parent 3f815dd commit c8ea755
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions scrapyd-client/scrapyd-deploy
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,16 @@ def main():
_log("Writing egg to %s" % opts.build_egg)
shutil.copyfile(egg, opts.build_egg)
elif opts.deploy_all_targets:
version = None
for name, target in _get_targets().items():
_build_egg_and_deploy_target(target,opts)
if version is None:
version = _get_version(target, opts)
_build_egg_and_deploy_target(target, version, opts)
else: # buld egg and deploy
target_name = _get_target_name(args)
target = _get_target(target_name)
_build_egg_and_deploy_target(target,opts)
version = _get_version(target, opts)
_build_egg_and_deploy_target(target, version, opts)

if tmpdir:
if opts.debug:
Expand All @@ -99,9 +103,8 @@ def main():

sys.exit(exitcode)

def _build_egg_and_deploy_target(target, opts):
def _build_egg_and_deploy_target(target, version, opts):
project = _get_project(target, opts)
version = _get_version(target, opts)
if opts.egg:
_log("Using egg: %s" % opts.egg)
egg = opts.egg
Expand Down

0 comments on commit c8ea755

Please sign in to comment.