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:
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']]
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([