Commit b4a5f6d2f043d14e3fc9457e070e871e3f51e9ef
1 parent
db1a53c6
Exists in
master
and in
17 other branches
Make the acts-as-taggable-on patch idempotent
Showing
1 changed file
with
4 additions
and
1 deletions
Show diff stats
config/software/gitlab-core.rb
... | ... | @@ -48,7 +48,10 @@ build do |
48 | 48 | # database at this point so that is a problem. This bug is fixed in |
49 | 49 | # acts-as-taggable-on 3.0.0 by |
50 | 50 | # https://github.com/mbleigh/acts-as-taggable-on/commit/ad02dc9bb24ec8e1e79e7e35e2d4bb5910a66d8e |
51 | - command "git apply #{Omnibus.project_root}/config/patches/acts-as-taggable-on-ad02dc9bb24ec8e1e79e7e35e2d4bb5910a66d8e.diff", | |
51 | + patch = "#{Omnibus.project_root}/config/patches/acts-as-taggable-on-ad02dc9bb24ec8e1e79e7e35e2d4bb5910a66d8e.diff" | |
52 | + # To make this idempotent, we apply the patch (in case this is a first run) or | |
53 | + # we revert and re-apply the patch (if this is a second or later run). | |
54 | + command "git apply #{patch} || (git apply -R #{patch} && git apply #{patch})", | |
52 | 55 | :cwd => "#{install_dir}/embedded/service/gem/ruby/1.9.1/gems/acts-as-taggable-on-2.4.1" |
53 | 56 | rake "assets:precompile", :env => {"RAILS_ENV" => "production"} |
54 | 57 | # Tear down now that the assets:precompile is done. | ... | ... |