support `fdroid build` for CI and dev builds
It is to be expected that --no-refresh does not refresh the git repo, so it can be used for testing. But running the command with --no-refresh does indeed:
DEBUG: > git rev-parse --show-toplevel
DEBUG: > git submodule foreach --recursive git reset --hard
DEBUG: > git submodule foreach --recursive git clean -dffx
DEBUG: > git fetch origin
DEBUG: > git fetch --prune --tags origin
DEBUG: > git remote set-head origin --auto
DEBUG: > git checkout -f HEAD
which is very much a refresh.
Further details of the problem: I've added an f-droid-build to the CICD builds of my app. It uses the gitlab ci mechanism. You can find the failed build here https://gitlab.com/ar-/apple-flinger/-/jobs/33773929 . The corresponding yaml file is here: https://gitlab.com/ar-/apple-flinger/blob/5ecfddefa4036bf1bcad5e48c53cbe2c23e0cfb8/.gitlab-ci.yml . There you can see the individual steps. It uses the latest master build of fdroidserver and fdroiddata. Then runs a normal fdroid build of my app, then replaces the upstream with the new feature and runs an fdroid build again. unfortunately it is being replaced by the upstream again, even though using --no-refresh.