diff --git a/pkgs/applications/version-management/gitlab/update.py b/pkgs/applications/version-management/gitlab/update.py index ae1f0ad4c506..650bd73aa845 100755 --- a/pkgs/applications/version-management/gitlab/update.py +++ b/pkgs/applications/version-management/gitlab/update.py @@ -1,5 +1,5 @@ #!/usr/bin/env nix-shell -#! nix-shell -i python3 -p bundix common-updater-scripts nix nix-prefetch-git python3 python3Packages.requests python3Packages.lxml python3Packages.click python3Packages.click-log +#! nix-shell -i python3 -p bundix common-updater-scripts nix nix-prefetch-git python3 python3Packages.requests python3Packages.lxml python3Packages.click python3Packages.click-log vgo2nix import click import click_log @@ -194,13 +194,21 @@ def update_gitaly(): data = _get_data_json() gitaly_server_version = data['ce']['passthru']['GITALY_SERVER_VERSION'] r = GitLabRepo('gitlab-org', 'gitaly') - rubyenv_dir = pathlib.Path(__file__).parent / 'gitaly' + gitaly_dir = pathlib.Path(__file__).parent / 'gitaly' for fn in ['Gemfile.lock', 'Gemfile']: - with open(rubyenv_dir / fn, 'w') as f: + with open(gitaly_dir / fn, 'w') as f: f.write(r.get_file(f"ruby/{fn}", f"v{gitaly_server_version}")) - subprocess.check_output(['bundix'], cwd=rubyenv_dir) + for fn in ['go.mod', 'go.sum']: + with open(gitaly_dir / fn, 'w') as f: + f.write(r.get_file(fn, f"v{gitaly_server_version}")) + + subprocess.check_output(['bundix'], cwd=gitaly_dir) + subprocess.check_output(['vgo2nix'], cwd=gitaly_dir) + + for fn in ['go.mod', 'go.sum']: + os.unlink(gitaly_dir / fn) # currently broken, as `gitaly.meta.position` returns # pkgs/development/go-modules/generic/default.nix # so update-source-version doesn't know where to update hashes