From 115f5dba2db207b009ce727f53ab26ddaa3d5a1e Mon Sep 17 00:00:00 2001 From: Ciaran Gultnieks Date: Mon, 27 Feb 2012 09:07:36 +0000 Subject: [PATCH] Fixed the build --install function --- build.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/build.py b/build.py index dfd9d7a0..fba24797 100755 --- a/build.py +++ b/build.py @@ -164,7 +164,7 @@ def build_local(app, thisbuild, vcs, build_dir, output_dir, extlib_dir, tmp_dir, cwd=root_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) else: if install: - antcommands = ['debug',' install'] + antcommands = ['debug','install'] elif thisbuild.has_key('antcommand'): antcommands = [thisbuild['antcommand']] else: @@ -174,6 +174,8 @@ def build_local(app, thisbuild, vcs, build_dir, output_dir, extlib_dir, tmp_dir, output, error = p.communicate() if p.returncode != 0: raise BuildException("Build failed for %s:%s" % (app['id'], thisbuild['version']), output.strip(), error.strip()) + if install: + return print "Build successful" # Find the apk name in the output... @@ -300,6 +302,9 @@ def parse_commandline(): help="Use 'ant debug install' to build and install a " + "debug version on your device or emulator. " + "Implies --force and --test") + parser.add_option("--all", action="store_true", default=False, + help="Use with --install, when not using --package" + " to confirm you really want to build and install everything.") options, args = parser.parse_args() if options.force and not options.test: @@ -311,6 +316,11 @@ def parse_commandline(): if options.server: print "Can't install when building on a build server." sys.exit(1) + if not options.package and not options.all: + print "This would build and install everything in the repo to the device." + print "You probably want to use --package and maybe also --vercode." + print "If you really want to install everything, use --all." + sys.exit(1) options.force = True options.test = True