mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-09 00:40:11 +01:00
checkupdates: ignore gradle comments
This commit is contained in:
parent
80a8a39f6f
commit
27a5dc8429
@ -1026,6 +1026,8 @@ def parse_androidmanifests(paths, ignoreversions=None):
|
|||||||
|
|
||||||
if gradle:
|
if gradle:
|
||||||
for line in file(path):
|
for line in file(path):
|
||||||
|
if gradle_comment.match(line):
|
||||||
|
continue
|
||||||
# Grab first occurence of each to avoid running into
|
# Grab first occurence of each to avoid running into
|
||||||
# alternative flavours and builds.
|
# alternative flavours and builds.
|
||||||
if not package:
|
if not package:
|
||||||
@ -1605,8 +1607,10 @@ def FDroidPopen(commands, cwd=None, output=True):
|
|||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
||||||
|
gradle_comment = re.compile(r'[ ]*//')
|
||||||
|
|
||||||
|
|
||||||
def remove_signing_keys(build_dir):
|
def remove_signing_keys(build_dir):
|
||||||
comment = re.compile(r'[ ]*//')
|
|
||||||
signing_configs = re.compile(r'^[\t ]*signingConfigs[ \t]*{[ \t]*$')
|
signing_configs = re.compile(r'^[\t ]*signingConfigs[ \t]*{[ \t]*$')
|
||||||
line_matches = [
|
line_matches = [
|
||||||
re.compile(r'^[\t ]*signingConfig [^ ]*$'),
|
re.compile(r'^[\t ]*signingConfig [^ ]*$'),
|
||||||
@ -1634,7 +1638,7 @@ def remove_signing_keys(build_dir):
|
|||||||
line = line.rstrip('\\\n') + lines[i]
|
line = line.rstrip('\\\n') + lines[i]
|
||||||
i += 1
|
i += 1
|
||||||
|
|
||||||
if comment.match(line):
|
if gradle_comment.match(line):
|
||||||
o.write(line)
|
o.write(line)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user