diff --git a/release_to_git/conditional_add.py b/release_to_git/conditional_add.py index 741fedf..1b90f34 100644 --- a/release_to_git/conditional_add.py +++ b/release_to_git/conditional_add.py @@ -203,8 +203,11 @@ def gitAddCommitTagAll(versionNumber): spout = subprocess.check_output([gitExecutable, "status", "--porcelain"], stderr = subprocess.STDOUT) if spout: # String is non-empty if repository is not up to date # Git commit - print("git committing local repo: ", localRepoPath, " Comment: ", versionNumber) - spout = subprocess.check_output([gitExecutable, "commit", "-a", "-m", versionNumber], stderr = subprocess.STDOUT) + commitComment = versionNumber + if "COMMIT_COMMENT" in os.environ : + commitComment = commitComment + ' :: ' + os.environ["COMMIT_COMMENT"] + print("git committing local repo: ", localRepoPath, " Comment: ", commitComment) + spout = subprocess.check_output([gitExecutable, "commit", "-a", "-m", commitComment], stderr = subprocess.STDOUT) print("Result: ", spout.decode('utf-8')) else: print("Not committing local repo: ", localRepoPath, " Repo is up to date / There are no changes.")