chiark / gitweb /
unified method for naming build output
authorMichael Pöhn <michael.poehn@fsfe.org>
Sat, 22 Apr 2017 10:04:32 +0000 (12:04 +0200)
committerMichael Pöhn <michael.poehn@fsfe.org>
Sat, 22 Apr 2017 10:04:32 +0000 (12:04 +0200)
fdroidserver/build.py
fdroidserver/dscanner.py
fdroidserver/update.py

index 7c4fddf33c7e042a954dc6909f7dd4b87acc422f..c16bd182622ee5631f8b837c59852a368d6a9398 100644 (file)
@@ -1212,7 +1212,7 @@ def main():
                         url = url.replace('%v', build.versionName)
                         url = url.replace('%c', str(build.versionCode))
                         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)
                         try:
                             net.download_file(url, local_filename=of)
@@ -1225,10 +1225,9 @@ def main():
                         # and remove everything from the unsigend folder.
                         with tempfile.TemporaryDirectory() as tmpdir:
                             unsigned_apk = \
-                                '{0}_{1}.apk'.format(appid,
-                                                     build.versionCode)
-                            unsigned_apk = os.path.join(output_dir,
-                                                        unsigned_apk)
+                                common.get_release_filename(app, build)
+                            unsigned_apk = \
+                                os.path.join(output_dir, unsigned_apk)
                             compare_result = \
                                 common.verify_apks(of, unsigned_apk, tmpdir)
                             if compare_result:
index 10e98b3177ae0f754c9c7e4ef0a695035b0f2fcf..a9ffa0275f7ffbe43072313489cb902fde6a9031 100644 (file)
@@ -467,7 +467,7 @@ def main():
         for build in app.builds:
             apks = []
             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:
                     apks.append(f)
             for apk in sorted(apks):
index a97a40bf4d7dc573c6d158e69075214800908629..d08bb25b8644d7dc1d37cd207f4e3bf21986cd06 100644 (file)
@@ -319,7 +319,7 @@ def delete_disabled_builds(apps, apkcache, repodirs):
         for build in app['builds']:
             if not build.disable:
                 continue
-            apkfilename = appid + '_' + str(build.versionCode) + '.apk'
+            apkfilename = common.get_release_filename(app, build)
             iconfilename = "%s.%s.png" % (
                 appid,
                 build.versionCode)