mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-14 06:52:39 +03:00
Fixed the build --install function
This commit is contained in:
parent
0583a0e188
commit
115f5dba2d
1 changed files with 11 additions and 1 deletions
10
build.py
10
build.py
|
@ -174,6 +174,8 @@ def build_local(app, thisbuild, vcs, build_dir, output_dir, extlib_dir, tmp_dir,
|
||||||
output, error = p.communicate()
|
output, error = p.communicate()
|
||||||
if p.returncode != 0:
|
if p.returncode != 0:
|
||||||
raise BuildException("Build failed for %s:%s" % (app['id'], thisbuild['version']), output.strip(), error.strip())
|
raise BuildException("Build failed for %s:%s" % (app['id'], thisbuild['version']), output.strip(), error.strip())
|
||||||
|
if install:
|
||||||
|
return
|
||||||
print "Build successful"
|
print "Build successful"
|
||||||
|
|
||||||
# Find the apk name in the output...
|
# Find the apk name in the output...
|
||||||
|
@ -300,6 +302,9 @@ def parse_commandline():
|
||||||
help="Use 'ant debug install' to build and install a " +
|
help="Use 'ant debug install' to build and install a " +
|
||||||
"debug version on your device or emulator. " +
|
"debug version on your device or emulator. " +
|
||||||
"Implies --force and --test")
|
"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()
|
options, args = parser.parse_args()
|
||||||
|
|
||||||
if options.force and not options.test:
|
if options.force and not options.test:
|
||||||
|
@ -311,6 +316,11 @@ def parse_commandline():
|
||||||
if options.server:
|
if options.server:
|
||||||
print "Can't install when building on a build server."
|
print "Can't install when building on a build server."
|
||||||
sys.exit(1)
|
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.force = True
|
||||||
options.test = True
|
options.test = True
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue