chore(ui): display branch in footer if present

This commit is contained in:
Adam Cooke
2024-03-20 14:30:32 +00:00
parent bee509832e
commit 18236171eb
3 changed files with 22 additions and 1 deletions
+12
View File
@@ -153,6 +153,18 @@ module Postal
ActiveRecord::Base.establish_connection(config.merge(pool: new_size))
end
# Return the branch name which created this release
#
# @return [String, nil]
def branch
return @branch if instance_variable_defined?("@branch")
@branch = begin
path = Rails.root.join("BRANCH")
File.read(path).strip if File.exist?(path)
end
end
end
Config = initialize_config