diff options
author | Milan Pässler <milan@petabyte.dev> | 2021-05-24 21:26:08 +0200 |
---|---|---|
committer | Milan Pässler <milan@petabyte.dev> | 2021-05-24 21:26:08 +0200 |
commit | 0c8f5b7b4494316b75e54a9ce1471c142748468d (patch) | |
tree | ea3a1cd3913c389b64e8fb6310f6b46e7420c96e /pkgs/applications/version-management/gitlab | |
parent | c57cf7b5eb37c4275d11b8138232da1b6ac0c1ea (diff) | |
download | nixpkgs-0c8f5b7b4494316b75e54a9ce1471c142748468d.tar nixpkgs-0c8f5b7b4494316b75e54a9ce1471c142748468d.tar.gz nixpkgs-0c8f5b7b4494316b75e54a9ce1471c142748468d.tar.bz2 nixpkgs-0c8f5b7b4494316b75e54a9ce1471c142748468d.tar.lz nixpkgs-0c8f5b7b4494316b75e54a9ce1471c142748468d.tar.xz nixpkgs-0c8f5b7b4494316b75e54a9ce1471c142748468d.tar.zst nixpkgs-0c8f5b7b4494316b75e54a9ce1471c142748468d.zip |
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.
Diffstat (limited to 'pkgs/applications/version-management/gitlab')
-rwxr-xr-x | pkgs/applications/version-management/gitlab/update.py | 8 |
1 files 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) |