Add --gpg-sign argument
Can't quite use it yet, but will be able to with the next OSTree release.
This commit is contained in:
parent
02b85c0885
commit
453667e41e
@ -268,6 +268,10 @@ def main():
|
|||||||
action='store',
|
action='store',
|
||||||
default=None,
|
default=None,
|
||||||
help="Stop at given phase")
|
help="Stop at given phase")
|
||||||
|
parser.add_option('', "--gpg-sign",
|
||||||
|
action='store',
|
||||||
|
default=None,
|
||||||
|
help="Sign commits using given GPG key ID")
|
||||||
parser.add_option('', "--os",
|
parser.add_option('', "--os",
|
||||||
action='store', dest='os',
|
action='store', dest='os',
|
||||||
default=None,
|
default=None,
|
||||||
@ -402,6 +406,8 @@ def main():
|
|||||||
[success, parent] = repo.resolve_rev(ref, True)
|
[success, parent] = repo.resolve_rev(ref, True)
|
||||||
[success, tree] = repo.write_mtree(mtree, None)
|
[success, tree] = repo.write_mtree(mtree, None)
|
||||||
[success, commit] = repo.write_commit(parent, '', commit_message, None, tree, None)
|
[success, commit] = repo.write_commit(parent, '', commit_message, None, tree, None)
|
||||||
|
if opts.gpg_sign is not None:
|
||||||
|
repo.sign_commit(commit, opts.gpg_sign, None, None)
|
||||||
repo.transaction_set_ref(None, ref, commit)
|
repo.transaction_set_ref(None, ref, commit)
|
||||||
repo.commit_transaction(None)
|
repo.commit_transaction(None)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user