diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-02-16 14:42:22 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-02-16 14:42:22 +0200 |
commit | b7297285369171c95b006e49d6da7bc84b969fc8 (patch) | |
tree | 9e5a93a2bd32439cf1033444890d452e33cf8cfa | |
parent | e65cc4f849174e2767f2121120ea8f1880c3d6d2 (diff) | |
download | gitlab-ce-b7297285369171c95b006e49d6da7bc84b969fc8.tar.gz |
uppercase Gitlab version and revision constants. check api return gitlab version now
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | app/views/help/index.html.haml | 4 | ||||
-rw-r--r-- | config/initializers/2_app.rb | 4 | ||||
-rw-r--r-- | lib/api/internal.rb | 4 | ||||
-rw-r--r-- | lib/tasks/gitlab/info.rake | 4 |
5 files changed, 10 insertions, 7 deletions
diff --git a/.gitignore b/.gitignore index 912d61a8f0a..21f261379b5 100644 --- a/.gitignore +++ b/.gitignore @@ -20,6 +20,7 @@ config/database.yml config/initializers/omniauth.rb config/unicorn.rb config/resque.yml +config/aws.yml db/data.yml .idea .DS_Store diff --git a/app/views/help/index.html.haml b/app/views/help/index.html.haml index 1a4411c8f30..879a19fdfb4 100644 --- a/app/views/help/index.html.haml +++ b/app/views/help/index.html.haml @@ -1,8 +1,8 @@ %h3.page_title GITLAB .pull-right - %span= Gitlab::Version - %small= Gitlab::Revision + %span= Gitlab::VERSION + %small= Gitlab::REVISION %hr %p.lead Self Hosted Git Management diff --git a/config/initializers/2_app.rb b/config/initializers/2_app.rb index 748f15a11d9..27a0c0ffeb2 100644 --- a/config/initializers/2_app.rb +++ b/config/initializers/2_app.rb @@ -1,6 +1,6 @@ module Gitlab - Version = File.read(Rails.root.join("VERSION")) - Revision = `git log --pretty=format:'%h' -n 1` + VERSION = File.read(Rails.root.join("VERSION")).strip + REVISION = `git log --pretty=format:'%h' -n 1` def self.config Settings diff --git a/lib/api/internal.rb b/lib/api/internal.rb index 3e5e3a478ba..5d74a761c05 100644 --- a/lib/api/internal.rb +++ b/lib/api/internal.rb @@ -40,7 +40,9 @@ module Gitlab get "/check" do { - api_version: '3' + api_version: Gitlab::API.version, + gitlab_version: Gitlab::VERSION, + gitlab_rev: Gitlab::REVISION, } end end diff --git a/lib/tasks/gitlab/info.rake b/lib/tasks/gitlab/info.rake index c44016ef6e8..091de6ee6d5 100644 --- a/lib/tasks/gitlab/info.rake +++ b/lib/tasks/gitlab/info.rake @@ -40,8 +40,8 @@ namespace :gitlab do puts "" puts "GitLab information".yellow - puts "Version:\t#{Gitlab::Version}" - puts "Revision:\t#{Gitlab::Revision}" + puts "Version:\t#{Gitlab::VERSION}" + puts "Revision:\t#{Gitlab::REVISION}" puts "Directory:\t#{Rails.root}" puts "DB Adapter:\t#{database_adapter}" puts "URL:\t\t#{Gitlab.config.gitlab.url}" |