Switch from os.path to pathlib
All checks were successful
pyzebra CI/CD pipeline / prepare (push) Successful in 1s
pyzebra CI/CD pipeline / test-env (push) Successful in 1m53s
pyzebra CI/CD pipeline / prod-env (push) Has been skipped
pyzebra CI/CD pipeline / cleanup (push) Successful in 1s

This commit is contained in:
2025-11-06 13:54:58 +01:00
parent 57c0037289
commit ec685d24eb

View File

@@ -4,6 +4,7 @@ import argparse
import os
import re
import subprocess
from pathlib import Path
def main():
@@ -13,7 +14,8 @@ def main():
print(f"Aborting, not on '{default_branch}' branch.")
return
version_filepath = os.path.join(os.path.basename(os.path.dirname(__file__)), "__init__.py")
project_path = Path(__file__).resolve().parent
version_filepath = project_path / project_path.name / "__init__.py"
parser = argparse.ArgumentParser()
parser.add_argument("level", type=str, choices=["patch", "minor", "major"])