From fdbf83651948dc8b8aac29cc548dd3fdf97d24a9 Mon Sep 17 00:00:00 2001 From: Stefan Zweifel Date: Wed, 22 Apr 2020 20:07:31 +0200 Subject: [PATCH] Split git-commit command --- entrypoint.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index 5c46e02..329745b 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -50,7 +50,13 @@ _add_files() { _local_commit() { echo "INPUT_COMMIT_OPTIONS: ${INPUT_COMMIT_OPTIONS}" - git -c user.name="$INPUT_COMMIT_USER_NAME" -c user.email="$INPUT_COMMIT_USER_EMAIL" commit -m "$INPUT_COMMIT_MESSAGE" --author="$INPUT_COMMIT_AUTHOR" ${INPUT_COMMIT_OPTIONS:+"$INPUT_COMMIT_OPTIONS"} + + if [ -n "$INPUT_COMMIT_OPTIONS" ] + then + git -c user.name="$INPUT_COMMIT_USER_NAME" -c user.email="$INPUT_COMMIT_USER_EMAIL" commit -m "$INPUT_COMMIT_MESSAGE" --author="$INPUT_COMMIT_AUTHOR" "$INPUT_COMMIT_OPTIONS" + else + git -c user.name="$INPUT_COMMIT_USER_NAME" -c user.email="$INPUT_COMMIT_USER_EMAIL" commit -m "$INPUT_COMMIT_MESSAGE" --author="$INPUT_COMMIT_AUTHOR" + fi } _tag_commit() {