diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 20:21:34 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 20:21:34 +0000 |
commit | fe1438b06234f8e5ecd4caa7eedfeec585b6f77c (patch) | |
tree | 5c2a9ff683189a61e0855ca3f24df319e7e03b7f /scripts/check_client_is_uptodate.py | |
parent | Initial commit. (diff) | |
download | pygls-fe1438b06234f8e5ecd4caa7eedfeec585b6f77c.tar.xz pygls-fe1438b06234f8e5ecd4caa7eedfeec585b6f77c.zip |
Adding upstream version 1.3.0.upstream/1.3.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'scripts/check_client_is_uptodate.py')
-rw-r--r-- | scripts/check_client_is_uptodate.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/scripts/check_client_is_uptodate.py b/scripts/check_client_is_uptodate.py new file mode 100644 index 0000000..1c5b1be --- /dev/null +++ b/scripts/check_client_is_uptodate.py @@ -0,0 +1,20 @@ +import sys +import subprocess + +AUTOGENERATED_CLIENT_FILE = "pygls/lsp/client.py" + +subprocess.run(["poe", "generate_client"]) + +result = subprocess.run( + ["git", "diff", "--exit-code", AUTOGENERATED_CLIENT_FILE], stdout=subprocess.DEVNULL +) + +if result.returncode == 0: + print("✅ Pygls client is up to date") +else: + print( + "🔴 Pygls client not uptodate\n" + "1. Generate with: `poetry run poe generate_client`\n" + "2. Commit" + ) + sys.exit(result.returncode) |