Merge branch 'main' into extract-env-writer
* main: Inline util method only used in one place
This commit is contained in:
@@ -53,7 +53,14 @@ class Kamal::Configuration
|
|||||||
end
|
end
|
||||||
|
|
||||||
def abbreviated_version
|
def abbreviated_version
|
||||||
Kamal::Utils.abbreviate_version(version)
|
if version
|
||||||
|
# Don't abbreviate <sha>_uncommitted_<etc>
|
||||||
|
if version.include?("_")
|
||||||
|
version
|
||||||
|
else
|
||||||
|
version[0...7]
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def minimum_version
|
def minimum_version
|
||||||
|
|||||||
@@ -79,18 +79,6 @@ module Kamal::Utils
|
|||||||
.gsub(DOLLAR_SIGN_WITHOUT_SHELL_EXPANSION_REGEX, '\$')
|
.gsub(DOLLAR_SIGN_WITHOUT_SHELL_EXPANSION_REGEX, '\$')
|
||||||
end
|
end
|
||||||
|
|
||||||
# Abbreviate a git revhash for concise display
|
|
||||||
def abbreviate_version(version)
|
|
||||||
if version
|
|
||||||
# Don't abbreviate <sha>_uncommitted_<etc>
|
|
||||||
if version.include?("_")
|
|
||||||
version
|
|
||||||
else
|
|
||||||
version[0...7]
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def uncommitted_changes
|
def uncommitted_changes
|
||||||
`git status --porcelain`.strip
|
`git status --porcelain`.strip
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user