chiark / gitweb /
Retrieve Binaries at build time
authorCiaran Gultnieks <ciaran@ciarang.com>
Sat, 31 Jan 2015 15:36:26 +0000 (15:36 +0000)
committerCiaran Gultnieks <ciaran@ciarang.com>
Sat, 31 Jan 2015 15:36:26 +0000 (15:36 +0000)
fdroidserver/build.py

index 79b1d5362790789a3232384d0d4d4341422efdf5..6069d43188e3590c333329f5284b8b66717e4cb5 100644 (file)
@@ -1066,6 +1066,23 @@ def main():
                             tmp_dir, repo_dir, vcs, options.test,
                             options.server, options.force,
                             options.onserver):
+
+                    if app.get('Binaries', None):
+                        # This is an app where we build from source, and
+                        # verify the apk contents against a developer's
+                        # binary. We get that binary now, and save it
+                        # alongside our built one in the 'unsigend'
+                        # directory.
+                        url = app['Binaries']
+                        url = url.replace('%v', thisbuild['version'])
+                        url = url.replace('%c', str(thisbuild['vercode']))
+                        logging.info("...retrieving " + url)
+                        of = "{0}_{1}.apk.binary".format(app['id'], thisbuild['vercode'])
+                        of = os.path.join(output_dir, of)
+                        p = FDroidPopen(['wget', '-nv', '-O', of, url])
+                        if p.returncode != 0 or not os.path.exists(of):
+                            raise BuildException("...failed to retrieve " + url)
+
                     build_succeeded.append(app)
                     wikilog = "Build succeeded"
             except BuildException as be: