chiark / gitweb /
New build flag: output= for e.g. full make builds
authorDaniel Martí <mvdan@mvdan.cc>
Tue, 28 Jan 2014 21:14:53 +0000 (22:14 +0100)
committerDaniel Martí <mvdan@mvdan.cc>
Tue, 28 Jan 2014 21:15:20 +0000 (22:15 +0100)
fdroidserver/build.py
fdroidserver/metadata.py

index 109425ccdcf82c9785ada43aa39fe73f72667b22..c60069d5d811adebf44fefb34fa3cd35ebdf1d4e 100644 (file)
@@ -618,7 +618,7 @@ def build_local(app, thisbuild, vcs, build_dir, output_dir, srclib_dir, extlib_d
 
         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']
 
@@ -655,6 +655,9 @@ def build_local(app, thisbuild, vcs, build_dir, output_dir, srclib_dir, extlib_d
         src = re.match(r".*^.*Creating (.+) for release.*$.*", stdout_apk,
             re.S|re.M).group(1)
         src = os.path.join(bindir, src)
+    elif thisbuild['type'] == 'raw':
+        src = os.path.join(root_dir, thisbuild['output'])
+        src = os.path.normpath(src)
 
     # Make sure it's not debuggable...
     if common.isApkDebuggable(src, config):
index c31a451ad465157c1cd5b29924e341c40d04701c..4f1a60b05719c130248f7dcac6023b99992dd3d4 100644 (file)
@@ -470,6 +470,8 @@ def parse_metadata(metafile):
         for t in ['maven', 'gradle', 'kivy']:
             if build.get(t, 'no') != 'no':
                 return t
+        if 'output' in build:
+            return 'raw'
         return 'ant'
 
     thisinfo = {}
@@ -698,7 +700,7 @@ def write_metadata(dest, app):
         # This defines the preferred order for the build items - as in the
         # manual, they're roughly in order of application.
         keyorder = ['disable', 'commit', 'subdir', 'submodules', 'init',
-                    'gradle', 'maven', 'oldsdkloc', 'target',
+                    'gradle', 'maven', 'output', 'oldsdkloc', 'target',
                     'update', 'encoding', 'forceversion', 'forcevercode', 'rm',
                     'fixtrans', 'fixapos', 'extlibs', 'srclibs', 'patch',
                     'prebuild', 'scanignore', 'scandelete', 'build', 'buildjni',