File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import os
2- import platform
32import re
43
54import pytest
@@ -39,12 +38,9 @@ def tmp_commitizen_project_with_gpg(tmp_commitizen_project):
3938 f .write (f"Name-Email: { _signer_mail } " + os .linesep )
4039 f .write ("Expire-Date: 1" + os .linesep )
4140
42- _key = cmd .run (
41+ cmd .run (
4342 f"gpg --batch --passphrase '' --pinentry-mode loopback --generate-key { _gpg_file } "
4443 )
45- # debug for mac github actions
46- if platform .system ().lower () == "darwin" :
47- print (f"MAC OS: new key created?\n { _key .out } \n { _key .err } " )
4844
4945 _new_key = cmd .run (f"gpg --list-secret-keys { _signer_mail } " )
5046 _m = re .search (
@@ -54,21 +50,9 @@ def tmp_commitizen_project_with_gpg(tmp_commitizen_project):
5450
5551 if _m :
5652 _key_id = _m .group (1 )
57- print (f"Key { _key_id } found for { _signer_mail } " )
5853 cmd .run ("git config --global commit.gpgsign true" )
5954 cmd .run (f"git config --global user.signingkey { _key_id } " )
6055
61- # debug for mac github actions
62- if platform .system ().lower () == "darwin" :
63- _check_macos = cmd .run ('echo "test" | gpg --clearsign' )
64- print (f"MACOS CHECK:\n { _check_macos .out } \n { _check_macos .err } " )
65-
66- _key_exist_macos = cmd .run ("gpg --list-secret-keys" )
67- print (f"MACOS List keys:\n { _key_exist_macos .out } \n { _key_exist_macos .err } " )
68-
69- _key_gpg2_macos = cmd .run ("gpg --list-keys" )
70- print (f"MACOS List keys:\n { _key_gpg2_macos .out } \n { _key_gpg2_macos .err } " )
71-
7256 yield tmp_commitizen_project
7357
7458
You can’t perform that action at this time.
0 commit comments