HMBXR5601-395 Append a commit comment

This commit is contained in:
Damian Smith 2018-08-13 13:37:43 +01:00
commit dc07a8b3fc

View file

@ -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.")