summaryrefslogtreecommitdiff
path: root/config/initializers/console_message.rb
blob: 523a3898043f4842a1b8b2551742b284f20b43a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# rubocop:disable Rails/Output
if Gitlab::Runtime.console?
  # note that this will not print out when using `spring`
  justify = 15

  puts '-' * 80
  puts " GitLab:".ljust(justify) + "#{Gitlab::VERSION} (#{Gitlab.revision}) #{Gitlab.ee? ? 'EE' : 'FOSS'}"
  puts " GitLab Shell:".ljust(justify) + "#{Gitlab::VersionInfo.parse(Gitlab::Shell.version)}"

  if Gitlab::Database.exists?
    puts " #{Gitlab::Database.human_adapter_name}:".ljust(justify) + Gitlab::Database.version

    Gitlab.ee do
      if Gitlab::Geo.connected? && Gitlab::Geo.enabled?
        puts " Geo enabled:".ljust(justify) + 'yes'
        puts " Geo server:".ljust(justify) + EE::GeoHelper.current_node_human_status
      end
    end
  end

  puts '-' * 80
end