Commit 9785f535c6d7e6a6f0bc3192a7c1d38dea4fd88f

Authored by Jacob Vosmaer
1 parent 1012e965

Explain the REVISION hack

Showing 1 changed file with 5 additions and 0 deletions   Show diff stats
config/software/gitlab-core.rb
@@ -30,6 +30,11 @@ dependency "postgresql" @@ -30,6 +30,11 @@ dependency "postgresql"
30 source :git => "https://gitlab.com/gitlab-org/gitlab-ce.git" 30 source :git => "https://gitlab.com/gitlab-org/gitlab-ce.git"
31 31
32 build do 32 build do
  33 + # GitLab assumes it can extract the Git revision of the currently version
  34 + # from the Git repo the code lives in at boot. Because of our rsync later on,
  35 + # this assumption does not hold. The sed command below patches the GitLab
  36 + # source code to include the Git revision of the code included in the omnibus
  37 + # build.
33 command "sed -i 's/.*REVISION.*/REVISION = \"#{version_guid.split(':').last[0,10]}\"/' config/initializers/2_app.rb" 38 command "sed -i 's/.*REVISION.*/REVISION = \"#{version_guid.split(':').last[0,10]}\"/' config/initializers/2_app.rb"
34 bundle "install --without mysql development test --path=#{install_dir}/embedded/service/gem" 39 bundle "install --without mysql development test --path=#{install_dir}/embedded/service/gem"
35 command "mkdir -p #{install_dir}/embedded/service/gitlab-core" 40 command "mkdir -p #{install_dir}/embedded/service/gitlab-core"