0

In Gitlab Omnibus installation, inside the /etc/gitlab/gitlab.rb configuration script, how can I detect the current version of Gitlab? (I need to enable/disable some features depending on version of Gitlab.)

edit: Please note I need this check to work specifically from inside gitlab.rb script! The answers described in How to check the version of Gitlab? are not clearly appropriate for this question out of the box. At least not without some highly non-obvious to me adaptation. If you can demonstrate how any of those applies, please show it explicitly, I can't see such a way myself.

4
  • Possible duplicate of How to check the version of Gitlab? Commented Jun 6, 2018 at 12:51
  • @Hackerman Please note I've edited to explain why stackoverflow.com/questions/21068773 is not a duplicate. At least not without some highly nonobvious adaptation Commented Jun 6, 2018 at 13:07
  • I didnt saw any version in gitlab.rb file. You might need to come out of gitlab.rb file and do as this suggests Commented Jun 8, 2018 at 7:39
  • @RajanaDeepak gitlab.rb is Ruby code, and is loaded by a Ruby script, so it's very much possible, that the loader, being part of Gitlab application, somehow exposes current Gitlab version to gitlab.rb code. That would be the perfect solution. Alternatively, maybe some (but not all) answers from "the other question" could be nontrivially adapted as Ruby code that could be used in gitlab.rb. Commented Jun 8, 2018 at 10:20

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.