From 8418b1397c3aaff9b7da5ee1bab61b366a441259 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milan=20P=C3=A4ssler?= Date: Mon, 24 May 2021 21:26:08 +0200 Subject: [PATCH] gitlab: add Gemfile fix to update script Since some GitLab versions, we need to remove the mail-smtp-pool dependency from the Gemfile, or do other modifications. Let's add those changes, that will probably be needed in the next version as well, to the update script. (cherry picked from commit 0c8f5b7b4494316b75e54a9ce1471c142748468d) --- pkgs/applications/version-management/gitlab/update.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/version-management/gitlab/update.py b/pkgs/applications/version-management/gitlab/update.py index 993dad08ec6..301589c532f 100755 --- a/pkgs/applications/version-management/gitlab/update.py +++ b/pkgs/applications/version-management/gitlab/update.py @@ -131,9 +131,11 @@ def update_rubyenv(): data = _get_data_json() rev = data['rev'] - for fn in ['Gemfile.lock', 'Gemfile']: - with open(rubyenv_dir / fn, 'w') as f: - f.write(repo.get_file(fn, rev)) + with open(rubyenv_dir / 'Gemfile.lock', 'w') as f: + f.write(repo.get_file('Gemfile.lock', rev)) + with open(rubyenv_dir / 'Gemfile', 'w') as f: + original = repo.get_file('Gemfile', rev) + f.write(re.sub(r".*mail-smtp_pool.*", "", original)) subprocess.check_output(['bundle', 'lock'], cwd=rubyenv_dir) subprocess.check_output(['bundix'], cwd=rubyenv_dir)