ai-dockpack 0.1.3__py3-none-any.whl → 0.1.4__py3-none-any.whl
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.
- ai_dockpack/init_impl.py +15 -4
- {ai_dockpack-0.1.3.dist-info → ai_dockpack-0.1.4.dist-info}/METADATA +1 -1
- ai_dockpack-0.1.4.dist-info/RECORD +10 -0
- ai_dockpack-0.1.3.dist-info/RECORD +0 -10
- {ai_dockpack-0.1.3.dist-info → ai_dockpack-0.1.4.dist-info}/WHEEL +0 -0
- {ai_dockpack-0.1.3.dist-info → ai_dockpack-0.1.4.dist-info}/entry_points.txt +0 -0
- {ai_dockpack-0.1.3.dist-info → ai_dockpack-0.1.4.dist-info}/licenses/LICENSE +0 -0
- {ai_dockpack-0.1.3.dist-info → ai_dockpack-0.1.4.dist-info}/top_level.txt +0 -0
ai_dockpack/init_impl.py
CHANGED
|
@@ -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
|
|
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
|
|
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"
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
ai_dockpack/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
ai_dockpack/build_impl.py,sha256=m7kmKbSqWANwLsZp5lLb0Bx9E8J9kb42Tzd2lQBsHIs,14394
|
|
3
|
+
ai_dockpack/cli.py,sha256=slarLqMHV-cuAUEe4rj02-TXoeoHiNJdiaCyU0Ebg5I,1373
|
|
4
|
+
ai_dockpack/init_impl.py,sha256=RkyoSrjWyVcI2KLl-BstcobKoow3baBvOaf0GdViFno,3193
|
|
5
|
+
ai_dockpack-0.1.4.dist-info/licenses/LICENSE,sha256=k6iVkamcaiKJ63W8XHdUJEg1VbOMrb8s7a0tM9NzffQ,1066
|
|
6
|
+
ai_dockpack-0.1.4.dist-info/METADATA,sha256=E7Sw12YVTCkXZ7tjwl357Md2g8Hpfetykghxy1bzvsY,348
|
|
7
|
+
ai_dockpack-0.1.4.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
8
|
+
ai_dockpack-0.1.4.dist-info/entry_points.txt,sha256=SGl4EPmqn0V8M4m3A-JkYmEYYptf0Zin9JcGxKR5Jfg,52
|
|
9
|
+
ai_dockpack-0.1.4.dist-info/top_level.txt,sha256=cJHOzSmSfahNTXKS7HGlzmoRZSbD1tc6PWAOiC7vWd0,12
|
|
10
|
+
ai_dockpack-0.1.4.dist-info/RECORD,,
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
ai_dockpack/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
ai_dockpack/build_impl.py,sha256=m7kmKbSqWANwLsZp5lLb0Bx9E8J9kb42Tzd2lQBsHIs,14394
|
|
3
|
-
ai_dockpack/cli.py,sha256=slarLqMHV-cuAUEe4rj02-TXoeoHiNJdiaCyU0Ebg5I,1373
|
|
4
|
-
ai_dockpack/init_impl.py,sha256=BFSI7hrdVNaofz8MoYfABAmQKDt2WmjUtQCWWIFI0Go,2957
|
|
5
|
-
ai_dockpack-0.1.3.dist-info/licenses/LICENSE,sha256=k6iVkamcaiKJ63W8XHdUJEg1VbOMrb8s7a0tM9NzffQ,1066
|
|
6
|
-
ai_dockpack-0.1.3.dist-info/METADATA,sha256=Q7xyT_irzxzEUNI0_59lAVStPIU1DsHQFcSfX-l6U_0,348
|
|
7
|
-
ai_dockpack-0.1.3.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
8
|
-
ai_dockpack-0.1.3.dist-info/entry_points.txt,sha256=SGl4EPmqn0V8M4m3A-JkYmEYYptf0Zin9JcGxKR5Jfg,52
|
|
9
|
-
ai_dockpack-0.1.3.dist-info/top_level.txt,sha256=cJHOzSmSfahNTXKS7HGlzmoRZSbD1tc6PWAOiC7vWd0,12
|
|
10
|
-
ai_dockpack-0.1.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|