1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-19 21:30:10 +01:00

Merge branch 'master' into 'master'

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

See merge request fdroid/fdroidserver!941
This commit is contained in:
Hans-Christoph Steiner 2021-06-07 08:10:43 +00:00
commit d95a3029a8
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` files=`git diff-index --cached HEAD 2>&1 | sed 's/^:.* //' | uniq | cut -b100-500`
if [ -z "$files" ]; then 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" PY_TEST_FILES="tests/*.TestCase"
SH_FILES="hooks/pre-commit" SH_FILES="hooks/pre-commit"
BASH_FILES="gradlew-fdroid jenkins-build-all jenkins-setup-build-environment jenkins-test completion/bash-completion buildserver/provision-*" 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 release = None
revision = None revision = None
for k, entries in checksums.items(): 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) m = re.search(r'-(r[1-9][0-9]?[a-z]?)-linux', k)
if m: if m:
d = {'url': k, 'release': m.group(1), 'sha256': checksums[k][0]['sha256']}
for entry in entries: for entry in entries:
if 'source.properties' in entry: if 'source.properties' in entry:
n = re.search( n = re.search(
r'[1-9][0-9]\.[0-9]\.[0-9]{7}', entry['source.properties'] r'[1-9][0-9]\.[0-9]\.[0-9]{7}', entry['source.properties']
) )
if n: if n:
release = m.group(1) d['revision'] = n.group()
revision = n.group() ndks.append(d)
ndks.append(
{
'url': k,
'release': release,
'revision': revision,
'sha256': checksums[k][0]['sha256'],
}
)
for d in config['NDKS']: for d in config['NDKS']:
if k == d['url']: if k == d['url']:
sha256 = d['sha256'] sha256 = d['sha256']