From 17096c3d01e00a2876a3aa473312b266ba33bf9d Mon Sep 17 00:00:00 2001 From: Mara-Li Date: Tue, 24 Dec 2024 19:28:37 +0100 Subject: [PATCH] ci: adjust taskfile --- Taskfile.yml | 22 ---------------------- clean.py | 21 --------------------- 2 files changed, 43 deletions(-) delete mode 100644 clean.py diff --git a/Taskfile.yml b/Taskfile.yml index c704f00..8ac4068 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -10,42 +10,20 @@ tasks: cmds: - task: release - clean: - desc: "Clean up old build files" - cmds: - - echo "Cleaning build directories..." - - uv run python clean.py - version: desc: "Run semantic-release to determine and bump the version" cmds: - echo "Running semantic-release to bump the version..." - uv run semantic-release -c semantic_release.toml version - build: - desc: "Build the Python package" - cmds: - - echo "Building the package..." - - uv build - publish: desc: "Publish the package to PyPI" cmds: - echo "Publishing {{.package_name}} to PyPI..." - uv run semantic-release -c semantic_release.toml publish - watch: - desc: "Start the Watchdog with custom paths" - vars: - package_path: "mkdocs-obsidian-wikilinks" - mkdocs_path: "../mara-li" - cmds: - - echo "Starting Watchdog for {{.package_path}} with MkDocs at {{.mkdocs_path}}..." - - uv run python watch.py {{.package_path}} {{.mkdocs_path}} - release: desc: "Perform a full release: version bump, build, and publish" cmds: - - task: clean - task: version - task: publish diff --git a/clean.py b/clean.py deleted file mode 100644 index d2cbb16..0000000 --- a/clean.py +++ /dev/null @@ -1,21 +0,0 @@ -import shutil -from pathlib import Path - - -def clean_directories(): - paths_to_clean = ["dist", "*.egg-info", ".pytest_cache"] - - for path in paths_to_clean: - absolute_path = Path(Path.cwd(), path) - if Path(absolute_path).is_dir(): - print(f"Removing directory: {absolute_path}") - shutil.rmtree(absolute_path, ignore_errors=True) - elif Path(absolute_path).is_file(): - print(f"Removing file: {absolute_path}") - Path.unlink(absolute_path) - else: - print(f"Path does not exist: {absolute_path}") - - -if __name__ == "__main__": - clean_directories()