mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-11 09:40:28 +03:00
Add build.binary
This commit is contained in:
parent
68e27c0a9b
commit
58f167b7e5
9 changed files with 116 additions and 3 deletions
|
|
@ -1143,7 +1143,7 @@ def main():
|
|||
tools_version_log = ''.join(f.readlines())
|
||||
os.remove(toolslog)
|
||||
|
||||
if app.Binaries is not None:
|
||||
if url := build.binary or app.Binaries:
|
||||
# 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
|
||||
|
|
@ -1155,7 +1155,6 @@ def main():
|
|||
"developer supplied reference "
|
||||
"binaries: '{path}'"
|
||||
.format(path=binaries_dir))
|
||||
url = app.Binaries
|
||||
url = url.replace('%v', build.versionName)
|
||||
url = url.replace('%c', str(build.versionCode))
|
||||
logging.info("...retrieving " + url)
|
||||
|
|
|
|||
|
|
@ -710,6 +710,7 @@ def read_pkg_args(appid_versionCode_pairs, allow_vercodes=False):
|
|||
|
||||
apk_regex = re.compile(r'_(\d+)\.apk$')
|
||||
for p in appid_versionCode_pairs:
|
||||
# Convert the apk name to a appid:versioncode pair
|
||||
p = apk_regex.sub(r':\1', p)
|
||||
if allow_vercodes and ':' in p:
|
||||
package, vercode = p.split(':')
|
||||
|
|
|
|||
|
|
@ -227,6 +227,7 @@ build_flags = [
|
|||
'maven',
|
||||
'buildozer',
|
||||
'output',
|
||||
'binary',
|
||||
'srclibs',
|
||||
'oldsdkloc',
|
||||
'encoding',
|
||||
|
|
@ -267,6 +268,7 @@ class Build(dict):
|
|||
self.maven = False
|
||||
self.buildozer = False
|
||||
self.output = None
|
||||
self.binary = None
|
||||
self.srclibs = []
|
||||
self.oldsdkloc = False
|
||||
self.encoding = None
|
||||
|
|
|
|||
|
|
@ -346,7 +346,11 @@ def main():
|
|||
sys.exit(1)
|
||||
app = allapps[appid]
|
||||
|
||||
if app.Binaries:
|
||||
build = None
|
||||
for b in app.get("Builds", ()):
|
||||
if b.get("versionCode") == vercode:
|
||||
build = b
|
||||
if app.Binaries or (build and build.binary):
|
||||
|
||||
# It's an app where we build from source, and verify the apk
|
||||
# contents against a developer's binary, and then publish their
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue