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