gitlab: add gitaly go mod
handling for the updater
This commit is contained in:
parent
6c98b0ff43
commit
722ee7756b
@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env nix-shell
|
#!/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
|
||||||
import click_log
|
import click_log
|
||||||
@ -194,13 +194,21 @@ def update_gitaly():
|
|||||||
data = _get_data_json()
|
data = _get_data_json()
|
||||||
gitaly_server_version = data['ce']['passthru']['GITALY_SERVER_VERSION']
|
gitaly_server_version = data['ce']['passthru']['GITALY_SERVER_VERSION']
|
||||||
r = GitLabRepo('gitlab-org', 'gitaly')
|
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']:
|
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}"))
|
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
|
# currently broken, as `gitaly.meta.position` returns
|
||||||
# pkgs/development/go-modules/generic/default.nix
|
# pkgs/development/go-modules/generic/default.nix
|
||||||
# so update-source-version doesn't know where to update hashes
|
# so update-source-version doesn't know where to update hashes
|
||||||
|
Loading…
Reference in New Issue
Block a user