Refactor Gemfile sync
Related issue: gitlab#3165 (closed)
Refactor Gemfile sync.
Dependent MR: gitlab!1778 (merged)
Use eval_gemfile
to reuse upstream Gemfile
, no longer need jh/Gemfile.jh
.
Before
cat Gemfile | sed -e 's@vendor/@../vendor/@' | sed -e "s@path: 'gems/@path: '../gems/@" > jh/Gemfile
cat jh/Gemfile.jh >> jh/Gemfile
./jh/bin/merge_checksum
cp Gemfile.lock jh/
sed -i 's@vendor@\.\.\/vendor@' jh/Gemfile.lock # should replace some "remote: gem/sth" to "remote: ../gem/sth"
bundle install
After
./jh/bin/merge_checksum
cat Gemfile.lock | sed -e '/^PATH$/{n;s/remote: /&..\//}' > jh/Gemfile.lock
bundle install
由 Baodong 编辑于