gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-merchant-terminal-android] 02/03: Improve nightly repo


From: gnunet
Subject: [taler-merchant-terminal-android] 02/03: Improve nightly repo
Date: Mon, 02 Mar 2020 21:24:30 +0100

This is an automated email from the git hooks/post-receive script.

torsten-grote pushed a commit to branch master
in repository merchant-terminal-android.

commit 05c2d35a1e490bd3c9cb1d8f2de5f3c98d9cdc27
Author: Torsten Grote <address@hidden>
AuthorDate: Mon Mar 2 14:28:39 2020 -0300

    Improve nightly repo
---
 .gitlab-ci.yml      |  7 +++++++
 nightly-stats.patch | 38 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 45 insertions(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 05106b6..9ad38f2 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -27,10 +27,17 @@ deploy_nightly:
     # Set time-based version code
     - export versionCode=$(date '+%s')
     - sed -i "s,^\(\s*versionCode\) *[0-9].*,\1 $versionCode," app/build.gradle
+    # Add commit to version name
+    - export versionName=$(git rev-parse --short=7 HEAD)
+    - sed -i "s,^\(\s*versionName\ *\"[0-9].*\)\",\1 ($versionName)\"," 
app/build.gradle
     # Set nightly application ID
     - sed -i "s,^\(\s*applicationId\) \"*[a-z\.].*\",\1 
\"net.taler.merchantpos.nightly\"," app/build.gradle
     # Build the APK
     - ./gradlew 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
+    # END
     - CI_PROJECT_URL="https://gitlab.com/gnu-taler/fdroid-repo"; 
CI_PROJECT_PATH="gnu-taler/fdroid-repo" fdroid nightly -v
 
 after_script:
diff --git a/nightly-stats.patch b/nightly-stats.patch
new file mode 100644
index 0000000..689f46a
--- /dev/null
+++ b/nightly-stats.patch
@@ -0,0 +1,38 @@
+diff --git a/fdroidserver/nightly.py b/fdroidserver/nightly.py
+index 0a3a8012..ae3aa0e3 100644
+--- a/fdroidserver/nightly.py
++++ b/fdroidserver/nightly.py
+@@ -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')
+         git_mirror_metadatadir = os.path.join(git_mirror_path, 'fdroid', 
'metadata')
++        git_mirror_statsdir = os.path.join(git_mirror_path, 'fdroid', 'stats')
+         if not os.path.isdir(git_mirror_repodir):
+             logging.debug(_('cloning {url}').format(url=clone_url))
+             try:
+@@ -217,6 +218,8 @@ Last updated: {date}'''.format(repo_git_base=repo_git_base,
+             common.local_rsync(options, git_mirror_repodir + '/', 'repo/')
+         if os.path.isdir(git_mirror_metadatadir):
+             common.local_rsync(options, git_mirror_metadatadir + '/', 
'metadata/')
++        if os.path.isdir(git_mirror_statsdir):
++            common.local_rsync(options, git_mirror_statsdir + '/', 'stats/')
+ 
+         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,
+         config += "keydname = '%s'\n" % DISTINGUISHED_NAME
+         config += "make_current_version_link = False\n"
+         config += "accepted_formats = ('txt', 'yml')\n"
+-        # TODO add update_stats = True
++        config += "update_stats = True\n"
+         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,
+         subprocess.check_call(['fdroid', 'update', '--rename-apks', 
'--create-metadata', '--verbose'],
+                               cwd=repo_basedir)
+         common.local_rsync(options, repo_basedir + '/metadata/', 
git_mirror_metadatadir + '/')
++        common.local_rsync(options, repo_basedir + '/stats/', 
git_mirror_statsdir + '/')
+         mirror_git_repo.git.add(all=True)
+         mirror_git_repo.index.commit("update app metadata")
+ 

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]