Skip to content

Commit efb4fa6

Browse files
committed
ci: update config & update version
1 parent de06f00 commit efb4fa6

File tree

4 files changed

+43
-17
lines changed

4 files changed

+43
-17
lines changed

Taskfile.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
version: "3"
22

33
vars:
4-
package_name: "mkdocs-obsidian-wikilinks"
4+
package_name: "mkdocs-embed-file-plugin"
55
pyproject_dir: "{{.Taskfile.Dir}}"
66

77
tasks:
@@ -14,13 +14,13 @@ tasks:
1414
desc: "Clean up old build files"
1515
cmds:
1616
- echo "Cleaning build directories..."
17-
- rm -r -Force {{.pyproject_dir}}/dist {{.pyproject_dir}}/*.egg-info {{.pyproject_dir}}/.pytest_cache
17+
- uv run python clean.py
1818

1919
version:
2020
desc: "Run semantic-release to determine and bump the version"
2121
cmds:
2222
- echo "Running semantic-release to bump the version..."
23-
- uv run semantic_release version
23+
- uv run semantic-release -c semantic_release.toml version
2424

2525
build:
2626
desc: "Build the Python package"
@@ -31,17 +31,17 @@ tasks:
3131
publish:
3232
desc: "Publish the package to PyPI"
3333
cmds:
34-
- echo "Publishing {{package_name}} to PyPI..."
35-
- uv run semantic_release publish
36-
37-
watch:
38-
desc: "Start the Watchdog with custom paths"
39-
vars:
40-
package_path: "mkdocs-obsidian-wikilinks"
41-
mkdocs_path: "../mara-li"
42-
cmds:
43-
- echo "Starting Watchdog for {{.package_path}} with MkDocs at {{.mkdocs_path}}..."
44-
- uv python watch.py {{.package_path}} {{.mkdocs_path}}
34+
- echo "Publishing {{.package_name}} to PyPI..."
35+
- uv run semantic-release -c semantic_release.toml publish
36+
37+
watch:
38+
desc: "Start the Watchdog with custom paths"
39+
vars:
40+
package_path: "mkdocs-obsidian-wikilinks"
41+
mkdocs_path: "../mara-li"
42+
cmds:
43+
- echo "Starting Watchdog for {{.package_path}} with MkDocs at {{.mkdocs_path}}..."
44+
- uv run python watch.py {{.package_path}} {{.mkdocs_path}}
4545

4646
release:
4747
desc: "Perform a full release: version bump, build, and publish"

clean.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import shutil
2+
from pathlib import Path
3+
4+
5+
def clean_directories():
6+
paths_to_clean = ["dist", "*.egg-info", ".pytest_cache"]
7+
8+
for path in paths_to_clean:
9+
absolute_path = Path(Path.cwd(), path)
10+
if Path(absolute_path).is_dir():
11+
print(f"Removing directory: {absolute_path}")
12+
shutil.rmtree(absolute_path, ignore_errors=True)
13+
elif Path(absolute_path).is_file():
14+
print(f"Removing file: {absolute_path}")
15+
Path.unlink(absolute_path)
16+
else:
17+
print(f"Path does not exist: {absolute_path}")
18+
19+
20+
if __name__ == "__main__":
21+
clean_directories()

pyproject.toml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "mkdocs-embed-file-plugin"
3-
version = "2.0.10"
3+
version = "2.0.11"
44
description = "A plugin to quote file from docs"
55
requires-python = ">=3.13"
66
dependencies = [
@@ -63,4 +63,9 @@ dev = [
6363
"python-semantic-release>=9.15.2",
6464
"build>=0.6.0",
6565
"rich>=13.9.4",
66-
]
66+
]
67+
68+
[[tool.uv.index]]
69+
name = "pypi"
70+
url = "https://pypi.org/simple/"
71+
publish-url = "https://upload.pypi.org/legacy/"

semantic_release.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ logging_use_named_masks = false
1111
major_on_zero = true
1212
allow_zero_version = true
1313
no_git_verify = false
14-
tag_format = "{version}"
14+
tag_format = "v{version}"
1515

1616
[semantic_release.branches.main]
1717
match = "(main|master)"

0 commit comments

Comments
 (0)