diff --git a/lib/kamal/configuration.rb b/lib/kamal/configuration.rb index 217c47c44..085f3cf41 100644 --- a/lib/kamal/configuration.rb +++ b/lib/kamal/configuration.rb @@ -53,7 +53,14 @@ def version end def abbreviated_version - Kamal::Utils.abbreviate_version(version) + if version + # Don't abbreviate _uncommitted_ + if version.include?("_") + version + else + version[0...7] + end + end end def minimum_version diff --git a/lib/kamal/utils.rb b/lib/kamal/utils.rb index 5a59470e6..6115531d1 100644 --- a/lib/kamal/utils.rb +++ b/lib/kamal/utils.rb @@ -79,18 +79,6 @@ def escape_shell_value(value) .gsub(DOLLAR_SIGN_WITHOUT_SHELL_EXPANSION_REGEX, '\$') end - # Abbreviate a git revhash for concise display - def abbreviate_version(version) - if version - # Don't abbreviate _uncommitted_ - if version.include?("_") - version - else - version[0...7] - end - end - end - def uncommitted_changes `git status --porcelain`.strip end