Commit 1eab8f87793cc7d27dfdd3f1f83da960023abceb

Authored by Jacob Vosmaer
1 parent 31c7cb80

Remove obsolete backup_read_REVISION patch

config/patches/gitlab-rails/backup_read_REVISION.patch
... ... @@ -1,22 +0,0 @@
1   -diff --git a/lib/backup/manager.rb b/lib/backup/manager.rb
2   -index efaefa4..8f0e38f 100644
3   ---- a/lib/backup/manager.rb
4   -+++ b/lib/backup/manager.rb
5   -@@ -7,7 +7,7 @@ module Backup
6   - s = {}
7   - s[:db_version] = "#{ActiveRecord::Migrator.current_version}"
8   - s[:backup_created_at] = Time.now
9   -- s[:gitlab_version] = %x{git rev-parse HEAD}.gsub(/\n/,"")
10   -+ s[:gitlab_version] = File.read(Rails.root.join('REVISION')).chomp
11   - s[:tar_version] = %x{tar --version | head -1}.gsub(/\n/,"")
12   -
13   - Dir.chdir(Gitlab.config.backup.path)
14   -@@ -92,7 +92,7 @@ module Backup
15   - Dir.chdir(Rails.root)
16   -
17   - # restoring mismatching backups can lead to unexpected problems
18   -- if settings[:gitlab_version] != %x{git rev-parse HEAD}.gsub(/\n/, "")
19   -+ if settings[:gitlab_version] != File.read(Rails.root.join('REVISION')).chomp
20   - puts "GitLab version mismatch:".red
21   - puts " Your current HEAD differs from the HEAD in the backup!".red
22   - puts " Please switch to the following revision and try again:".red
config/software/gitlab-rails.rb
... ... @@ -43,8 +43,6 @@ build do
43 43 # source code to include the Git revision of the code included in the omnibus
44 44 # build.
45 45 command "sed -i \"s/.*REVISION.*/REVISION = '$(git log --pretty=format:'%h' -n 1)'/\" config/initializers/2_app.rb"
46   - patch :source => "backup_read_REVISION.patch"
47   - command "git rev-parse HEAD > REVISION"
48 46  
49 47 # The user uploads path is not (yet) configurable in gitlab-rails. As a
50 48 # workaround, omnibus-gitlab creates a symlink for public/uploads. This breaks
... ...