Skip to content
This repository has been archived by the owner on Apr 12, 2021. It is now read-only.

Commit

Permalink
gitlab: support passing --rev to the update-all script
Browse files Browse the repository at this point in the history
While it's already possible to invoke `update-data` with the `--rev`
argument, one still needs to run all later phases manually.

Fix this, by having `update-all` also accept a `--rev` argument, and
pass it down to `update-data`.

Also, make the help text a bit more usable, by suggesting the usual
versioning scheme used these times.
  • Loading branch information
flokli authored and Milan committed Apr 27, 2020
1 parent 9a23aea commit 412bb5e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pkgs/applications/version-management/gitlab/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def cli():


@cli.command('update-data')
@click.option('--rev', default='latest', help='The rev to use, \'latest\' points to the latest (stable) tag')
@click.option('--rev', default='latest', help='The rev to use (vX.Y.Z-ee), or \'latest\'')
def update_data(rev: str):
"""Update data.nix"""
repo = GitLabRepo()
Expand Down Expand Up @@ -227,10 +227,11 @@ def update_gitlab_workhorse():
os.unlink(gitlab_workhorse_dir / fn)

@cli.command('update-all')
@click.option('--rev', default='latest', help='The rev to use (vX.Y.Z-ee), or \'latest\'')
@click.pass_context
def update_all(ctx):
def update_all(ctx, rev: str):
"""Update all gitlab components to the latest stable release"""
ctx.invoke(update_data, rev='latest')
ctx.invoke(update_data, rev=rev)
ctx.invoke(update_rubyenv)
ctx.invoke(update_yarnpkgs)
ctx.invoke(update_gitaly)
Expand Down

0 comments on commit 412bb5e

Please sign in to comment.