Merge pull request #878 from pagbrl/main

feat: Use git email as performer when available
This commit is contained in:
Donal McBreen
2024-07-15 13:41:17 +01:00
committed by GitHub
5 changed files with 8 additions and 4 deletions

View File

@@ -9,6 +9,10 @@ module Kamal::Git
`git config user.name`.strip
end
def email
`git config user.email`.strip
end
def revision
`git rev-parse HEAD`.strip
end

View File

@@ -10,7 +10,7 @@ class Kamal::Tags
def default_tags(config)
{ recorded_at: Time.now.utc.iso8601,
performer: `whoami`.chomp,
performer: Kamal::Git.email.presence || `whoami`.chomp,
destination: config.destination,
version: config.version,
service_version: service_version(config),