discourse-mail-receiver: Add update_mail_receiver to update.py

This commit is contained in:
talyz 2022-03-25 12:06:14 +01:00
parent 068c5a0c80
commit d46598d4f4
No known key found for this signature in database
GPG key ID: 2DED2151F4671A2B

View file

@ -259,6 +259,25 @@ def update(rev):
f.truncate()
@cli.command()
@click.argument('rev', default='latest')
def update_mail_receiver(rev):
"""Update discourse-mail-receiver.
REV: the git rev to update to ('vX.Y.Z') or 'latest'; defaults to
'latest'.
"""
repo = DiscourseRepo(repo="mail-receiver")
if rev == 'latest':
version = repo.versions[0]
else:
version = DiscourseVersion(rev)
_call_nix_update('discourse-mail-receiver', version.version)
@cli.command()
def update_plugins():
"""Update plugins to their latest revision."""