ai-dockpack 0.1.3__tar.gz → 0.1.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ai-dockpack
3
- Version: 0.1.3
3
+ Version: 0.1.4
4
4
  Summary: AI-readable doc pack generator (CLI)
5
5
  Requires-Python: >=3.9
6
6
  Description-Content-Type: text/markdown
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "ai-dockpack"
7
- version = "0.1.3"
7
+ version = "0.1.4"
8
8
  description = "AI-readable doc pack generator (CLI)"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
@@ -19,3 +19,4 @@ package-dir = {"" = "src"}
19
19
  [tool.setuptools.packages.find]
20
20
  where = ["src"]
21
21
 
22
+
@@ -10,6 +10,12 @@ def init_workflow(repo_path: str, *, publish_release: bool = True, force: bool =
10
10
  - publish_release=True: 生成 Release(Assets 里可直接下载 docpack.zip)
11
11
  - publish_release=False: 只上传 Actions Artifact
12
12
  """
13
+ try:
14
+ from importlib.metadata import version as _pkg_version
15
+ tool_version = _pkg_version("ai-dockpack")
16
+ except Exception:
17
+ tool_version = "0.0.0"
18
+
13
19
  repo = Path(repo_path).resolve()
14
20
  if not repo.exists():
15
21
  raise FileNotFoundError(f"repo not found: {repo}")
@@ -52,10 +58,12 @@ def init_workflow(repo_path: str, *, publish_release: bool = True, force: bool =
52
58
  " push:\n"
53
59
  ' branches: ["main"]\n'
54
60
  " workflow_dispatch:\n\n"
55
- f"{permissions_block}"
61
+ f"{permissions_block}\n\n"
56
62
  "jobs:\n"
57
63
  " build-docpack:\n"
58
64
  " runs-on: ubuntu-latest\n"
65
+ " env:\n"
66
+ f' AI_DOCKPACK_VERSION: "{tool_version}"\n'
59
67
  " steps:\n"
60
68
  " - name: Checkout\n"
61
69
  " uses: actions/checkout@v4\n\n"
@@ -63,10 +71,10 @@ def init_workflow(repo_path: str, *, publish_release: bool = True, force: bool =
63
71
  " uses: actions/setup-python@v5\n"
64
72
  " with:\n"
65
73
  ' python-version: "3.11"\n\n'
66
- " - name: Install ai-dockpack (from GitHub)\n"
74
+ " - name: Install ai-dockpack (from PyPI)\n"
67
75
  " run: |\n"
68
76
  " python -m pip install --upgrade pip\n"
69
- ' pip install --no-cache-dir --force-reinstall "git+https://github.com/Kuan-Peng/ai-dockpack.git@main"\n\n'
77
+ ' pip install --no-cache-dir "ai-dockpack==${{ env.AI_DOCKPACK_VERSION }}"\n\n'
70
78
  " - name: Build docpack.zip\n"
71
79
  " run: |\n"
72
80
  " ai-dockpack build --repo . --out docpack.zip\n\n"
@@ -75,7 +83,10 @@ def init_workflow(repo_path: str, *, publish_release: bool = True, force: bool =
75
83
  " with:\n"
76
84
  " name: docpack\n"
77
85
  " path: docpack.zip\n"
78
- )
86
+ )
87
+
88
+
89
+
79
90
 
80
91
  if publish_release:
81
92
  yml = yml + "\n" + release_step + "\n"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ai-dockpack
3
- Version: 0.1.3
3
+ Version: 0.1.4
4
4
  Summary: AI-readable doc pack generator (CLI)
5
5
  Requires-Python: >=3.9
6
6
  Description-Content-Type: text/markdown
File without changes
File without changes
File without changes