From: Daniel Martí Date: Wed, 29 Jan 2014 12:57:57 +0000 (+0100) Subject: Merge branch 'master' into logging X-Git-Tag: 0.2~341 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=72fa1891bf19acc88a5135aea6d1b068282b5e50;p=fdroidserver.git Merge branch 'master' into logging Conflicts: fdroidserver/build.py --- 72fa1891bf19acc88a5135aea6d1b068282b5e50 diff --cc fdroidserver/build.py index 96daeeb6,c60069d5..bdf54ed2 --- a/fdroidserver/build.py +++ b/fdroidserver/build.py @@@ -428,14 -444,15 +429,15 @@@ def build_local(app, thisbuild, vcs, bu raise BuildException("Can't build due to " + str(len(buildprobs)) + " scanned problems") - # Build the source tarball right before we build the release... - logging.info("Creating source tarball...") - tarname = common.getsrcname(app,thisbuild) - tarball = tarfile.open(os.path.join(tmp_dir, tarname), "w:gz") - def tarexc(f): - return any(f.endswith(s) for s in ['.svn', '.git', '.hg', '.bzr']) - tarball.add(build_dir, tarname, exclude=tarexc) - tarball.close() + if not options.notarball: + # Build the source tarball right before we build the release... - print "Creating source tarball..." ++ logging.info("Creating source tarball...") + tarname = common.getsrcname(app,thisbuild) + tarball = tarfile.open(os.path.join(tmp_dir, tarname), "w:gz") + def tarexc(f): + return any(f.endswith(s) for s in ['.svn', '.git', '.hg', '.bzr']) + tarball.add(build_dir, tarname, exclude=tarexc) + tarball.close() # Run a build command if one is required... if 'build' in thisbuild: @@@ -588,8 -607,8 +590,8 @@@ p = FDroidPopen(commands, cwd=gradle_dir) - else: + elif thisbuild['type'] == 'ant': - print "Building Ant project..." + logging.info("Building Ant project...") cmd = ['ant'] if 'antcommand' in thisbuild: cmd += [thisbuild['antcommand']] @@@ -599,9 -618,9 +601,9 @@@ bindir = os.path.join(root_dir, 'bin') - if p.returncode != 0: + if p is not None and p.returncode != 0: raise BuildException("Build failed for %s:%s" % (app['id'], thisbuild['version']), p.stdout) - print "Successfully built version " + thisbuild['version'] + ' of ' + app['id'] + logging.info("Successfully built version " + thisbuild['version'] + ' of ' + app['id']) if thisbuild['type'] == 'maven': stdout_apk = '\n'.join([