summaryrefslogtreecommitdiff
path: root/lib/gitlab.rb
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@vanlanduyt.co>2018-10-01 15:59:44 +0200
committerBob Van Landuyt <bob@vanlanduyt.co>2018-10-02 16:11:32 +0200
commitb09e40624b9fc6a7b4a7b38f174bc66d996e3fd5 (patch)
tree5bbe4e8da4966bbdbc30e6ab7bcfa50caff1c29b /lib/gitlab.rb
parentdf73116f75d4a7545fb4a7684aa76624efede7d0 (diff)
downloadgitlab-ce-b09e40624b9fc6a7b4a7b38f174bc66d996e3fd5.tar.gz
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.
Diffstat (limited to 'lib/gitlab.rb')
-rw-r--r--lib/gitlab.rb4
1 files changed, 4 insertions, 0 deletions
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