Commit b7297285369171c95b006e49d6da7bc84b969fc8

Authored by Dmitriy Zaporozhets
1 parent e65cc4f8

uppercase Gitlab version and revision constants. check api return gitlab version now

.gitignore
... ... @@ -20,6 +20,7 @@ config/database.yml
20 20 config/initializers/omniauth.rb
21 21 config/unicorn.rb
22 22 config/resque.yml
  23 +config/aws.yml
23 24 db/data.yml
24 25 .idea
25 26 .DS_Store
... ...
app/views/help/index.html.haml
1 1 %h3.page_title
2 2 GITLAB
3 3 .pull-right
4   - %span= Gitlab::Version
5   - %small= Gitlab::Revision
  4 + %span= Gitlab::VERSION
  5 + %small= Gitlab::REVISION
6 6 %hr
7 7 %p.lead
8 8 Self Hosted Git Management
... ...
config/initializers/2_app.rb
1 1 module Gitlab
2   - Version = File.read(Rails.root.join("VERSION"))
3   - Revision = `git log --pretty=format:'%h' -n 1`
  2 + VERSION = File.read(Rails.root.join("VERSION")).strip
  3 + REVISION = `git log --pretty=format:'%h' -n 1`
4 4  
5 5 def self.config
6 6 Settings
... ...
lib/api/internal.rb
... ... @@ -40,7 +40,9 @@ module Gitlab
40 40  
41 41 get "/check" do
42 42 {
43   - api_version: '3'
  43 + api_version: Gitlab::API.version,
  44 + gitlab_version: Gitlab::VERSION,
  45 + gitlab_rev: Gitlab::REVISION,
44 46 }
45 47 end
46 48 end
... ...
lib/tasks/gitlab/info.rake
... ... @@ -40,8 +40,8 @@ namespace :gitlab do
40 40  
41 41 puts ""
42 42 puts "GitLab information".yellow
43   - puts "Version:\t#{Gitlab::Version}"
44   - puts "Revision:\t#{Gitlab::Revision}"
  43 + puts "Version:\t#{Gitlab::VERSION}"
  44 + puts "Revision:\t#{Gitlab::REVISION}"
45 45 puts "Directory:\t#{Rails.root}"
46 46 puts "DB Adapter:\t#{database_adapter}"
47 47 puts "URL:\t\t#{Gitlab.config.gitlab.url}"
... ...