mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-10-08 18:31:07 +03:00
unified method for naming build output
This commit is contained in:
parent
62af9b8e3d
commit
5b7209d882
3 changed files with 6 additions and 7 deletions
|
@ -1212,7 +1212,7 @@ def main():
|
||||||
url = url.replace('%v', build.versionName)
|
url = url.replace('%v', build.versionName)
|
||||||
url = url.replace('%c', str(build.versionCode))
|
url = url.replace('%c', str(build.versionCode))
|
||||||
logging.info("...retrieving " + url)
|
logging.info("...retrieving " + url)
|
||||||
of = "{0}_{1}.apk.binary".format(app.id, build.versionCode)
|
of = common.get_release_filename(app, build) + '.binary'
|
||||||
of = os.path.join(output_dir, of)
|
of = os.path.join(output_dir, of)
|
||||||
try:
|
try:
|
||||||
net.download_file(url, local_filename=of)
|
net.download_file(url, local_filename=of)
|
||||||
|
@ -1225,10 +1225,9 @@ def main():
|
||||||
# and remove everything from the unsigend folder.
|
# and remove everything from the unsigend folder.
|
||||||
with tempfile.TemporaryDirectory() as tmpdir:
|
with tempfile.TemporaryDirectory() as tmpdir:
|
||||||
unsigned_apk = \
|
unsigned_apk = \
|
||||||
'{0}_{1}.apk'.format(appid,
|
common.get_release_filename(app, build)
|
||||||
build.versionCode)
|
unsigned_apk = \
|
||||||
unsigned_apk = os.path.join(output_dir,
|
os.path.join(output_dir, unsigned_apk)
|
||||||
unsigned_apk)
|
|
||||||
compare_result = \
|
compare_result = \
|
||||||
common.verify_apks(of, unsigned_apk, tmpdir)
|
common.verify_apks(of, unsigned_apk, tmpdir)
|
||||||
if compare_result:
|
if compare_result:
|
||||||
|
|
|
@ -467,7 +467,7 @@ def main():
|
||||||
for build in app.builds:
|
for build in app.builds:
|
||||||
apks = []
|
apks = []
|
||||||
for f in os.listdir(options.repo_path):
|
for f in os.listdir(options.repo_path):
|
||||||
n = "%v_%v.apk".format(app_id, build.versionCode)
|
n = common.get_release_filename(app, build)
|
||||||
if f == n:
|
if f == n:
|
||||||
apks.append(f)
|
apks.append(f)
|
||||||
for apk in sorted(apks):
|
for apk in sorted(apks):
|
||||||
|
|
|
@ -319,7 +319,7 @@ def delete_disabled_builds(apps, apkcache, repodirs):
|
||||||
for build in app['builds']:
|
for build in app['builds']:
|
||||||
if not build.disable:
|
if not build.disable:
|
||||||
continue
|
continue
|
||||||
apkfilename = appid + '_' + str(build.versionCode) + '.apk'
|
apkfilename = common.get_release_filename(app, build)
|
||||||
iconfilename = "%s.%s.png" % (
|
iconfilename = "%s.%s.png" % (
|
||||||
appid,
|
appid,
|
||||||
build.versionCode)
|
build.versionCode)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue