diff options
author | Torsten Grote <t@grobox.de> | 2020-05-11 10:54:26 -0300 |
---|---|---|
committer | Torsten Grote <t@grobox.de> | 2020-05-11 10:54:26 -0300 |
commit | 60b8c88d19611b761e14f6cafba087ef2678b508 (patch) | |
tree | 5b770f3b95fe3bbc57bd336033e50cbb2b3a175b | |
parent | 04ec034fdee134e676876909273875f1473fd9b0 (diff) | |
download | taler-android-60b8c88d19611b761e14f6cafba087ef2678b508.tar.gz taler-android-60b8c88d19611b761e14f6cafba087ef2678b508.tar.bz2 taler-android-60b8c88d19611b761e14f6cafba087ef2678b508.zip |
[wallet] Fix F-Droid nightly repo archive, so less versions stay in repo
-rw-r--r-- | nightly-stats.patch | 23 | ||||
-rw-r--r-- | wallet/.gitlab-ci.yml | 4 |
2 files changed, 22 insertions, 5 deletions
diff --git a/nightly-stats.patch b/nightly-stats.patch index 689f46a..35e0429 100644 --- a/nightly-stats.patch +++ b/nightly-stats.patch @@ -1,7 +1,16 @@ diff --git a/fdroidserver/nightly.py b/fdroidserver/nightly.py -index 0a3a8012..ae3aa0e3 100644 +index 7a90294d..9ad806b3 100644 --- a/fdroidserver/nightly.py +++ b/fdroidserver/nightly.py +@@ -102,7 +102,7 @@ def main(): + help=_('The file to be included in the repo (path or glob)')) + parser.add_argument("--no-checksum", action="store_true", default=False, + help=_("Don't use rsync checksums")) +- parser.add_argument("--archive-older", default=20, ++ parser.add_argument("--archive-older", type=int, default=20, + help=_("Set maximum releases in repo before older ones are archived")) + # TODO add --with-btlog + options = parser.parse_args() @@ -170,6 +170,7 @@ def main(): git_mirror_path = os.path.join(repo_basedir, 'git-mirror') git_mirror_repodir = os.path.join(git_mirror_path, 'fdroid', 'repo') @@ -19,7 +28,15 @@ index 0a3a8012..ae3aa0e3 100644 ssh_private_key_file = _ssh_key_from_debug_keystore() # this is needed for GitPython to find the SSH key -@@ -246,7 +249,7 @@ Last updated: {date}'''.format(repo_git_base=repo_git_base, +@@ -235,6 +238,7 @@ Last updated: {date}'''.format(repo_git_base=repo_git_base, + config += "archive_name = '%s'\n" % (repo_git_base + ' archive') + config += "archive_url = '%s'\n" % (repo_base + '/archive') + config += "archive_icon = 'icon.png'\n" ++ config += "archive_description = 'Old nightly builds that have been archived.'\n" + config += "archive_older = %i\n" % options.archive_older + config += "servergitmirrors = '%s'\n" % servergitmirror + config += "keystore = '%s'\n" % KEYSTORE_FILE +@@ -244,7 +248,7 @@ Last updated: {date}'''.format(repo_git_base=repo_git_base, config += "keydname = '%s'\n" % DISTINGUISHED_NAME config += "make_current_version_link = False\n" config += "accepted_formats = ('txt', 'yml')\n" @@ -28,7 +45,7 @@ index 0a3a8012..ae3aa0e3 100644 with open('config.py', 'w') as fp: fp.write(config) os.chmod('config.py', 0o600) -@@ -293,6 +296,7 @@ Last updated: {date}'''.format(repo_git_base=repo_git_base, +@@ -291,6 +295,7 @@ Last updated: {date}'''.format(repo_git_base=repo_git_base, subprocess.check_call(['fdroid', 'update', '--rename-apks', '--create-metadata', '--verbose'], cwd=repo_basedir) common.local_rsync(options, repo_basedir + '/metadata/', git_mirror_metadatadir + '/') diff --git a/wallet/.gitlab-ci.yml b/wallet/.gitlab-ci.yml index 1da4e64..d14eaa9 100644 --- a/wallet/.gitlab-ci.yml +++ b/wallet/.gitlab-ci.yml @@ -39,6 +39,6 @@ wallet_deploy_nightly: - ./gradlew :wallet:assembleDebug # START only needed while patch not accepted/released upstream - apt update && apt install patch - - patch /usr/lib/python3/dist-packages/fdroidserver/nightly.py nightly-stats.patch + - patch -b /usr/lib/python3/dist-packages/fdroidserver/nightly.py nightly-stats.patch # END - - CI_PROJECT_URL="https://gitlab.com/gnu-taler/fdroid-repo" CI_PROJECT_PATH="gnu-taler/fdroid-repo" fdroid nightly -v --archive-older 5 + - CI_PROJECT_URL="https://gitlab.com/gnu-taler/fdroid-repo" CI_PROJECT_PATH="gnu-taler/fdroid-repo" fdroid nightly -v --archive-older 6 |