Merge pull request #396 from igor-alexandrov/track-uncommitted-changes

Log uncommitted changes during deploy
This commit is contained in:
Donal McBreen
2023-07-25 14:35:44 +01:00
committed by GitHub
5 changed files with 24 additions and 4 deletions

View File

@@ -253,7 +253,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