diff --git a/tools/publish b/tools/publish deleted file mode 100755 index 518a83a..0000000 --- a/tools/publish +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env python3 - - -import os -import subprocess -import sys - -import click - -GL_V4_URL = "gitlab.com/api/v4" -PROJECT_ID = "66789848" - - -@click.command() -def publish(): - gitlab_token = os.getenv("GITLAB_TOKEN", None) - if not gitlab_token: - click.echo("You must have GITLAB_TOKEN in your environment. Exiting") - sys.exit(1) - - fetch_url = f"https://__token__:{gitlab_token}@{GL_V4_URL}/projects/{PROJECT_ID}/packages/pypi/simple" - push_url = f"https://{GL_V4_URL}/projects/{PROJECT_ID}/packages/pypi" - - try: - command = [ - "uv", - "publish", - "--username", - "__token__", - "--password", - gitlab_token, - "--publish-url", - push_url, - "--check-url", - fetch_url, - ] - click.echo(f"Command: {' '.join(command)}") - result = subprocess.run( - command, - ) - if result.returncode != 0: - click.echo("Error while running `uv publish`. Exiting") - sys.exit(2) - except subprocess.CalledProcessError as e: - click.echo(f"Error: {e}") - sys.exit(3) - - -if __name__ == "__main__": - publish()