From b09e40624b9fc6a7b4a7b38f174bc66d996e3fd5 Mon Sep 17 00:00:00 2001 From: Bob Van Landuyt Date: Mon, 1 Oct 2018 15:59:44 +0200 Subject: Show the commit-sha for pre-release versions The pre-release tags are set at the beginning of a release, so it would be impossible to figure out which version was running if we're running nightlies. In that case it's better to still link to the SHA. These versions don't get deployed to .com. --- lib/gitlab.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib') diff --git a/lib/gitlab.rb b/lib/gitlab.rb index ab6b609d099..7790534d5d7 100644 --- a/lib/gitlab.rb +++ b/lib/gitlab.rb @@ -47,4 +47,8 @@ module Gitlab def self.dev_env_or_com? Rails.env.development? || org? || com? end + + def self.pre_release? + VERSION.include?('pre') + end end -- cgit v1.2.3