Class: Gitlab::Source

Inherits:
Object
  • Object
show all
Defined in:
lib/gitlab/source.rb

Overview

rubocop:disable Gitlab/NamespacedClass

Class Method Summary collapse

Class Method Details

.refObject



6
7
8
9
10
# File 'lib/gitlab/source.rb', line 6

def ref
  return Gitlab.revision if Gitlab.pre_release?

  "v#{Gitlab::VERSION}"
end

.release_urlObject



12
13
14
15
16
17
18
19
20
# File 'lib/gitlab/source.rb', line 12

def release_url
  path = if Gitlab.pre_release?
           url_helpers.namespace_project_commits_path(group, project, ref)
         else
           url_helpers.namespace_project_tag_path(group, project, ref)
         end

  Gitlab::Utils.append_path(host_url, path)
end