From 0acca029096761cfec8a45649a112b0388b90ddd Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Sat, 20 Nov 2021 17:08:46 +0100 Subject: [PATCH] Add git tag task --- tasks.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tasks.py b/tasks.py index 43ae5e2..495808e 100644 --- a/tasks.py +++ b/tasks.py @@ -49,3 +49,10 @@ def publish_docker(ctx): echo=True, ) ctx.run(f"docker push {docker_image}", pty=True, echo=True) + + +@task +def tag(ctx, tag_name): + with ctx.cd(BASE_DIR): + ctx.run(f'git tag {tag_name} -am "{tag_name}"', pty=True, echo=True) + ctx.run(f"git push origin {tag_name}", pty=True, echo=True)