Resolve "gitlab 10.8 assumes that installation is a git working copy."

What does this MR do?

This replaces Gitlab::REVISION with a Gitlab.revision which handles installation that don't have a .git directory. In that case, Gitlab.revision will return Unknown.

Are there points in the code the reviewer needs to double check?

This is a quick fix to resolve the %10.8 regression, but I've suggested a more long-term improvement in where we'd use a new REVISION file and update it at release time.

omnibus-gitlab!2540 (merged) needs to be released in the same release as this fix.

Why was this MR needed?

Because otherwise the revision would be set to fatal: Not a git repository, which isn't very helpful.

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Closes #46600 (closed)

Edited by Grzegorz Bizon

Merge request reports