From 0999b0c46cd92339d56d70ce616d3a99bcb1a02e Mon Sep 17 00:00:00 2001 From: Nick Dumas Date: Fri, 3 Feb 2023 13:54:30 +0000 Subject: [PATCH] First draft of smart-commit.sh --- smart-commit/smart-commit.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 smart-commit/smart-commit.sh diff --git a/smart-commit/smart-commit.sh b/smart-commit/smart-commit.sh new file mode 100755 index 0000000..5e3c42d --- /dev/null +++ b/smart-commit/smart-commit.sh @@ -0,0 +1,10 @@ +#! /bin/bash + +STATUS=$(git status --porcelain) +STATUS_LEN=${#STATUS} +if [ $STATUS_LEN = 0 ]; then + exit 0 +else + git add . + git commit --verbose # -qm "CI/CD Commit: $(date -Iseconds)" +fi