Log uncommitted changes during deploy

This commit is contained in:
Igor Alexandrov
2023-07-21 18:37:45 +04:00
parent 5e8df58e6b
commit 0cfafd1d25
5 changed files with 25 additions and 4 deletions

View File

@@ -262,7 +262,7 @@ class Mrsk::Configuration
def git_version
@git_version ||=
if system("git rev-parse")
uncommitted_suffix = `git status --porcelain`.strip.present? ? "_uncommitted_#{SecureRandom.hex(8)}" : ""
uncommitted_suffix = Mrsk::Utils.uncommitted_changes.present? ? "_uncommitted_#{SecureRandom.hex(8)}" : ""
"#{`git rev-parse HEAD`.strip}#{uncommitted_suffix}"
else