From d50a80a282b2ca145841774f4be154a977cccfd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Coutable?= Date: Thu, 24 May 2018 09:57:54 +0200 Subject: Replace Gitlab::REVISION with Gitlab.revision and handle installations without a .git directory MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémy Coutable --- config/initializers/console_message.rb | 2 +- config/initializers/sentry.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'config') diff --git a/config/initializers/console_message.rb b/config/initializers/console_message.rb index 536ab337d85..2c46a25f365 100644 --- a/config/initializers/console_message.rb +++ b/config/initializers/console_message.rb @@ -3,7 +3,7 @@ if defined?(Rails::Console) # note that this will not print out when using `spring` justify = 15 puts "-------------------------------------------------------------------------------------" - puts " Gitlab:".ljust(justify) + "#{Gitlab::VERSION} (#{Gitlab::REVISION})" + puts " Gitlab:".ljust(justify) + "#{Gitlab::VERSION} (#{Gitlab.revision})" puts " Gitlab Shell:".ljust(justify) + Gitlab::Shell.new.version puts " #{Gitlab::Database.adapter_name}:".ljust(justify) + Gitlab::Database.version puts "-------------------------------------------------------------------------------------" diff --git a/config/initializers/sentry.rb b/config/initializers/sentry.rb index b2da3b3dc19..17d09293205 100644 --- a/config/initializers/sentry.rb +++ b/config/initializers/sentry.rb @@ -13,7 +13,7 @@ def configure_sentry if sentry_enabled Raven.configure do |config| config.dsn = Gitlab::CurrentSettings.current_application_settings.sentry_dsn - config.release = Gitlab::REVISION + config.release = Gitlab.revision # Sanitize fields based on those sanitized from Rails. config.sanitize_fields = Rails.application.config.filter_parameters.map(&:to_s) -- cgit v1.2.1