Skip to content

Commit

Permalink
Don't sign git tags (haikuports#283)
Browse files Browse the repository at this point in the history
Rationale: when the git config setting `tag.gpgSign=true` is used, this implies the `-s` option to
`git tag`. This means that git needs a message for the tag. Because no message is given, git
invokes an editor, which doesn't work when running non-interactively.

We don't need signed tags in a git repo created by HaikuPorter, so the easiest solution is to pass
`--no-sign` to `git tag` calls.
  • Loading branch information
jmairboeck authored Mar 18, 2024
1 parent b14ff61 commit 36d7d9e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions HaikuPorter/Source.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ def commitPatchPhase(self):
output = check_output(['git', 'commit', '-a', '-q', '-m', 'patch function'],
cwd=self.sourceDir, env=self.gitEnv).decode('utf-8')
info(output)
output = check_output(['git', 'tag', '-f', 'PATCH_FUNCTION', 'HEAD'],
output = check_output(['git', 'tag', '--no-sign', '-f', 'PATCH_FUNCTION', 'HEAD'],
cwd=self.sourceDir).decode('utf-8')
info(output)

Expand Down Expand Up @@ -508,7 +508,8 @@ def _initImplicitGitRepo(self):
info(check_output(['git', 'add', '-f', '.'], cwd=self.sourceDir).decode('utf-8'))
info(check_output(['git', 'commit', '-m', 'import', '-q'],
cwd=self.sourceDir, env=self.gitEnv).decode('utf-8'))
info(check_output(['git', 'tag', 'ORIGIN'], cwd=self.sourceDir).decode('utf-8'))
info(check_output(['git', 'tag', '--no-sign', 'ORIGIN'],
cwd=self.sourceDir).decode('utf-8'))

def _isInGitWorkingDirectory(self, path):
"""Returns whether the given source directory path is in a git working
Expand Down

0 comments on commit 36d7d9e

Please sign in to comment.