Merge branch 'two-fixes-for-tests' into 'master'

two fixes for the tests

See merge request fdroid/fdroidserver!1657
This commit is contained in:
Hans-Christoph Steiner 2025-06-10 17:14:21 +00:00
commit d4a71cd572
2 changed files with 14 additions and 7 deletions

View File

@ -469,6 +469,8 @@ macOS:
gradle:
image: debian:bookworm-slim
rules:
- if: "$PERSONAL_ACCESS_TOKEN"
<<: *apt-template
variables:
GIT_DEPTH: 1000
@ -485,12 +487,15 @@ gradle:
python3-requests
# if this is a merge request fork, then only check if relevant files changed
- if [ "$CI_PROJECT_NAMESPACE" != "fdroid" ]; then
set -x;
git fetch https://gitlab.com/fdroid/fdroidserver.git;
for f in `git diff --name-only --diff-filter=d FETCH_HEAD...HEAD`; do
test "$f" == "makebuildserver" && export CHANGED="yes";
test "$f" == "gradlew-fdroid" && export CHANGED="yes";
test "$f" == "makebuildserver" && export CHANGED="$f $CHANGED";
test "$f" == "gradlew-fdroid" && export CHANGED="$f $CHANGED";
done;
test -z "$CHANGED" && exit;
echo $CHANGED;
set +x;
fi
- ./tests/gradle-release-checksums.py

View File

@ -152,11 +152,6 @@ def _should_file_be_generated(path, magic_string):
def make_website(apps, repodir, repodict):
_ignored, repo_pubkey_fingerprint = extract_pubkey()
repo_pubkey_fingerprint_stripped = repo_pubkey_fingerprint.replace(" ", "")
link = repodict["address"]
link_fingerprinted = ('{link}?fingerprint={fingerprint}'
.format(link=link, fingerprint=repo_pubkey_fingerprint_stripped))
# do not change this string, as it will break updates for files with older versions of this string
autogenerate_comment = "auto-generated - fdroid index updates will overwrite this file"
@ -168,6 +163,13 @@ def make_website(apps, repodir, repodict):
if _should_file_be_generated(html_file, autogenerate_comment):
import qrcode
_ignored, repo_pubkey_fingerprint = extract_pubkey()
repo_pubkey_fingerprint_stripped = repo_pubkey_fingerprint.replace(" ", "")
link = repodict["address"]
link_fingerprinted = '{link}?fingerprint={fingerprint}'.format(
link=link, fingerprint=repo_pubkey_fingerprint_stripped
)
qrcode.make(link_fingerprinted).save(os.path.join(repodir, "index.png"))
with open(html_file, 'w') as f:
name = repodict["name"]