1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-04 22:40:12 +01:00

tests/ndk-release-checksums.py: fix parsing of NDK r10e

This wasn't finding r10e properly, so it would submit merge requests
to remove r10e from _fdroidserver_.

* !940
* !930
This commit is contained in:
Hans-Christoph Steiner 2021-06-01 15:02:32 +02:00
parent d060a8c691
commit cb09a16133
No known key found for this signature in database
GPG Key ID: 3E177817BA1B9BFA
2 changed files with 7 additions and 12 deletions

View File

@ -8,7 +8,7 @@ exec 1>&2
files=`git diff-index --cached HEAD 2>&1 | sed 's/^:.* //' | uniq | cut -b100-500`
if [ -z "$files" ]; then
PY_FILES="fdroid makebuildserver setup.py fdroidserver/*.py examples/*.py tests/gradle-release-checksums.py"
PY_FILES="fdroid makebuildserver setup.py fdroidserver/*.py examples/*.py tests/*-release-checksums.py"
PY_TEST_FILES="tests/*.TestCase"
SH_FILES="hooks/pre-commit"
BASH_FILES="gradlew-fdroid jenkins-build-all jenkins-setup-build-environment jenkins-test completion/bash-completion buildserver/provision-*"

View File

@ -35,25 +35,20 @@ errors = 0
release = None
revision = None
for k, entries in checksums.items():
if k.startswith('https://dl.google.com/android/repository/android-ndk'):
if k.endswith('.zip') and k.startswith(
'https://dl.google.com/android/repository/android-ndk'
):
m = re.search(r'-(r[1-9][0-9]?[a-z]?)-linux', k)
if m:
d = {'url': k, 'release': m.group(1), 'sha256': checksums[k][0]['sha256']}
for entry in entries:
if 'source.properties' in entry:
n = re.search(
r'[1-9][0-9]\.[0-9]\.[0-9]{7}', entry['source.properties']
)
if n:
release = m.group(1)
revision = n.group()
ndks.append(
{
'url': k,
'release': release,
'revision': revision,
'sha256': checksums[k][0]['sha256'],
}
)
d['revision'] = n.group()
ndks.append(d)
for d in config['NDKS']:
if k == d['url']:
sha256 = d['sha256']