From c46d0e777993c3362b5512f091a84e79b7048fc2 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Mon, 25 Mar 2019 18:25:11 -0300 Subject: Adds COMMIT_AFTER_ENCRYPT setting --- ChangeLog | 4 ++++ lib/keyringer/actions/encrypt | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index 1142a1a..83defe1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2019-03-25 - Silvio Rhatto + + Adds COMMIT_AFTER_ENCRYPT setting + 2019-01-29 - 0.5.4 - Silvio Rhatto Use --no-encrypt-to GnuPG option to strictly respect the recipients file diff --git a/lib/keyringer/actions/encrypt b/lib/keyringer/actions/encrypt index 11db62c..e25ad6c 100755 --- a/lib/keyringer/actions/encrypt +++ b/lib/keyringer/actions/encrypt @@ -124,5 +124,10 @@ if [ -d "$BASEDIR/.git" ]; then keyringer_exec git "$BASEDIR" add "keys/$FILE" fi +# Optional commit depending on the value of this setting +if [ "$COMMIT_AFTER_ENCRYPT" == "yes" ]; then + keyringer_exec git "$BASEDIR" commit -m "Changes for $FILE" +fi + # Done exit "$?" -- cgit v1.2.3