mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-16 16:02:33 +03:00
Only report files that were actually cleaned of signing stuff
This commit is contained in:
parent
7c2e61a407
commit
26154127e6
1 changed files with 13 additions and 5 deletions
|
@ -1632,6 +1632,8 @@ def remove_signing_keys(build_dir):
|
|||
with open(path, "r") as o:
|
||||
lines = o.readlines()
|
||||
|
||||
changed = False
|
||||
|
||||
opened = 0
|
||||
with open(path, "w") as o:
|
||||
for line in lines:
|
||||
|
@ -1644,15 +1646,18 @@ def remove_signing_keys(build_dir):
|
|||
continue
|
||||
|
||||
if signing_configs.match(line):
|
||||
changed = True
|
||||
opened += 1
|
||||
continue
|
||||
|
||||
if any(s.match(line) for s in line_matches):
|
||||
changed = True
|
||||
continue
|
||||
|
||||
if opened == 0:
|
||||
o.write(line)
|
||||
|
||||
if changed:
|
||||
logging.info("Cleaned build.gradle of keysigning configs at %s" % path)
|
||||
|
||||
for propfile in [
|
||||
|
@ -1667,14 +1672,17 @@ def remove_signing_keys(build_dir):
|
|||
with open(path, "r") as o:
|
||||
lines = o.readlines()
|
||||
|
||||
changed = False
|
||||
|
||||
with open(path, "w") as o:
|
||||
for line in lines:
|
||||
if line.startswith('key.store'):
|
||||
continue
|
||||
if line.startswith('key.alias'):
|
||||
if any(line.startswith(s) for s in ('key.store', 'key.alias')):
|
||||
changed = True
|
||||
continue
|
||||
|
||||
o.write(line)
|
||||
|
||||
if changed:
|
||||
logging.info("Cleaned %s of keysigning configs at %s" % (propfile, path))
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue