From 1d27a3246cf836573282b2bfbf3d3fa45810466e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20L=C3=BChne?= Date: Mon, 20 Nov 2017 00:11:28 +0100 Subject: [PATCH] Add support for GPG signing --- benchmark.py | 9 +++++++-- config.example.yaml | 4 +++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/benchmark.py b/benchmark.py index 624b12269..0f571455e 100755 --- a/benchmark.py +++ b/benchmark.py @@ -59,9 +59,14 @@ def initRepo(config): git(["clone", config["storage"]["remote"], dataDir], None) # default settings - git(["config", "--local", "user.name", config["storage"]["user"]], dataDir) + git(["config", "--local", "user.name", config["storage"]["userName"]], dataDir) git(["config", "--local", "user.email", config["storage"]["userEMail"]], dataDir) - git(["config", "--local", "commit.gpgsign", "false"], dataDir) + + if "userSigningKey" in config["storage"]: + git(["config", "--local", "user.signingkey", config["storage"]["userSigningKey"]], dataDir) + git(["config", "--local", "commit.gpgsign", "true"], dataDir) + else: + git(["config", "--local", "commit.gpgsign", "false"], dataDir) # fetch origin git(["fetch"], cwd = dataDir) diff --git a/config.example.yaml b/config.example.yaml index 406cda6c5..8ca26eb32 100644 --- a/config.example.yaml +++ b/config.example.yaml @@ -4,9 +4,11 @@ storage: # repote Git repository URL remote: git@git.luehne.de:patrick/tplp-planning-benchmark.git # user name for commits - user: potassco-bot + userName: potassco-bot # user e-mail for commits userEMail: bot@potassco.org + # user GPG key for signing commits (optional) + # userSigningKey: 12345678 # data branches branches: results: results