mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 15:00:30 +03:00
added parse release filename function
This commit is contained in:
parent
b993d93395
commit
7c4b8bcac4
2 changed files with 30 additions and 0 deletions
|
|
@ -511,6 +511,20 @@ def publishednameinfo(filename):
|
|||
return result
|
||||
|
||||
|
||||
apk_release_filename = re.compile('(?P<appid>[a-z0-9_\.]+)_(?P<vercode>[0-9]+)\.apk')
|
||||
apk_release_filename_with_sigfp = re.compile('(?P<appid>[a-z0-9_\.]+)_(?P<vercode>[0-9]+)_(?P<sigfp>[0-9a-f]{7})\.apk')
|
||||
|
||||
|
||||
def apk_parse_release_filename(apkname):
|
||||
m = apk_release_filename_with_sigfp.match(apkname)
|
||||
if m:
|
||||
return m.group('appid'), m.group('vercode'), m.group('sigfp')
|
||||
m = apk_release_filename.match(apkname)
|
||||
if m:
|
||||
return m.group('appid'), m.group('vercode'), None
|
||||
return None, None, None
|
||||
|
||||
|
||||
def get_release_filename(app, build):
|
||||
if build.output:
|
||||
return "%s_%s.%s" % (app.id, build.versionCode, get_file_extension(build.output))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue