mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-20 13:50:12 +01:00
Add another build option to skip source scanning
It can be very slow on large source code dirs, and if one is trying to get an application building and the scan already succeeded once, running it again and again is a waste of time.
This commit is contained in:
parent
cb3a08ff4b
commit
898e4485c2
@ -94,7 +94,7 @@ __complete_options() {
|
|||||||
__complete_build() {
|
__complete_build() {
|
||||||
opts="-h -v -c -l -s -t -f"
|
opts="-h -v -c -l -s -t -f"
|
||||||
lopts="--help --verbose --latest --server --resetserver --on-server
|
lopts="--help --verbose --latest --server --resetserver --on-server
|
||||||
--force --all"
|
--skip-scan --no-tarball --force --all"
|
||||||
case "${cur}" in
|
case "${cur}" in
|
||||||
-*)
|
-*)
|
||||||
__complete_options
|
__complete_options
|
||||||
|
@ -419,16 +419,17 @@ def build_local(app, thisbuild, vcs, build_dir, output_dir, srclib_dir, extlib_d
|
|||||||
raise BuildException("Error cleaning %s:%s" %
|
raise BuildException("Error cleaning %s:%s" %
|
||||||
(app['id'], thisbuild['version']), p.stdout)
|
(app['id'], thisbuild['version']), p.stdout)
|
||||||
|
|
||||||
# Scan before building...
|
if not options.skipscan:
|
||||||
logging.info("Scanning source for common problems...")
|
# Scan before building...
|
||||||
buildprobs = common.scan_source(build_dir, root_dir, thisbuild)
|
logging.info("Scanning source for common problems...")
|
||||||
if len(buildprobs) > 0:
|
buildprobs = common.scan_source(build_dir, root_dir, thisbuild)
|
||||||
logging.info('Scanner found %d problems:' % len(buildprobs))
|
if len(buildprobs) > 0:
|
||||||
for problem in buildprobs:
|
logging.info('Scanner found %d problems:' % len(buildprobs))
|
||||||
logging.info(' %s' % problem)
|
for problem in buildprobs:
|
||||||
if not force:
|
logging.info(' %s' % problem)
|
||||||
raise BuildException("Can't build due to " +
|
if not force:
|
||||||
str(len(buildprobs)) + " scanned problems")
|
raise BuildException("Can't build due to " +
|
||||||
|
str(len(buildprobs)) + " scanned problems")
|
||||||
|
|
||||||
if not options.notarball:
|
if not options.notarball:
|
||||||
# Build the source tarball right before we build the release...
|
# Build the source tarball right before we build the release...
|
||||||
@ -777,6 +778,8 @@ def parse_commandline():
|
|||||||
help="Reset and create a brand new build server, even if the existing one appears to be ok.")
|
help="Reset and create a brand new build server, even if the existing one appears to be ok.")
|
||||||
parser.add_option("--on-server", dest="onserver", action="store_true", default=False,
|
parser.add_option("--on-server", dest="onserver", action="store_true", default=False,
|
||||||
help="Specify that we're running on the build server")
|
help="Specify that we're running on the build server")
|
||||||
|
parser.add_option("--skip-scan", dest="skipscan", action="store_true", default=False,
|
||||||
|
help="Skip scanning the source code for binaries and other problems")
|
||||||
parser.add_option("--no-tarball", dest="notarball", action="store_true", default=False,
|
parser.add_option("--no-tarball", dest="notarball", action="store_true", default=False,
|
||||||
help="Don't create a source tarball, useful when testing a build")
|
help="Don't create a source tarball, useful when testing a build")
|
||||||
parser.add_option("-f", "--force", action="store_true", default=False,
|
parser.add_option("-f", "--force", action="store_true", default=False,
|
||||||
|
Loading…
Reference in New Issue
Block a user