autopub 1.0.0a24__py3-none-any.whl → 1.0.0a26__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- autopub/__init__.py +0 -20
- autopub/plugins/git.py +14 -2
- {autopub-1.0.0a24.dist-info → autopub-1.0.0a26.dist-info}/METADATA +1 -1
- {autopub-1.0.0a24.dist-info → autopub-1.0.0a26.dist-info}/RECORD +7 -7
- {autopub-1.0.0a24.dist-info → autopub-1.0.0a26.dist-info}/LICENSE +0 -0
- {autopub-1.0.0a24.dist-info → autopub-1.0.0a26.dist-info}/WHEEL +0 -0
- {autopub-1.0.0a24.dist-info → autopub-1.0.0a26.dist-info}/entry_points.txt +0 -0
autopub/__init__.py
CHANGED
@@ -2,8 +2,6 @@ from __future__ import annotations
|
|
2
2
|
|
3
3
|
import hashlib
|
4
4
|
import json
|
5
|
-
import subprocess
|
6
|
-
import textwrap
|
7
5
|
from functools import cached_property
|
8
6
|
from pathlib import Path
|
9
7
|
from typing import Iterable, Mapping, TypeAlias
|
@@ -153,8 +151,6 @@ class Autopub:
|
|
153
151
|
plugin.post_publish(release_info)
|
154
152
|
|
155
153
|
self._delete_release_file()
|
156
|
-
self._commit()
|
157
|
-
self._push()
|
158
154
|
|
159
155
|
def validate_config(self) -> None:
|
160
156
|
errors: dict[str, ValidationError] = {}
|
@@ -171,22 +167,6 @@ class Autopub:
|
|
171
167
|
def _delete_release_file(self) -> None:
|
172
168
|
self.release_file.unlink(missing_ok=True)
|
173
169
|
|
174
|
-
def _commit(self) -> None:
|
175
|
-
commit_message = textwrap.dedent(
|
176
|
-
f"""
|
177
|
-
Release {self.release_info.version}
|
178
|
-
|
179
|
-
{self.release_info.release_notes}
|
180
|
-
|
181
|
-
[skip ci]
|
182
|
-
"""
|
183
|
-
)
|
184
|
-
|
185
|
-
subprocess.run(["git", "commit", "-m", commit_message])
|
186
|
-
|
187
|
-
def _push(self) -> None:
|
188
|
-
subprocess.run(["git", "push"])
|
189
|
-
|
190
170
|
def _write_artifact(self, release_info: ReleaseInfo) -> None:
|
191
171
|
data = {
|
192
172
|
**release_info.dict(),
|
autopub/plugins/git.py
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
from __future__ import annotations
|
2
2
|
|
3
|
+
import textwrap
|
4
|
+
|
3
5
|
from autopub.plugins import AutopubPlugin
|
4
6
|
from autopub.types import ReleaseInfo
|
5
7
|
|
@@ -15,9 +17,19 @@ class GitPlugin(AutopubPlugin):
|
|
15
17
|
|
16
18
|
self.run_command(["git", "tag", tag_name])
|
17
19
|
|
20
|
+
commit_message = textwrap.dedent(
|
21
|
+
f"""
|
22
|
+
Release {release_info.version}
|
23
|
+
|
24
|
+
{release_info.release_notes}
|
25
|
+
|
26
|
+
[skip ci]
|
27
|
+
"""
|
28
|
+
)
|
29
|
+
|
18
30
|
# TODO: config?
|
19
31
|
self.run_command(["git", "rm", "RELEASE.md"])
|
20
|
-
self.run_command(["git", "add", "--all", "--", "
|
21
|
-
self.run_command(["git", "commit", "-m",
|
32
|
+
self.run_command(["git", "add", "--all", "--", ":!.autopub"])
|
33
|
+
self.run_command(["git", "commit", "-m", commit_message])
|
22
34
|
self.run_command(["git", "push"])
|
23
35
|
self.run_command(["git", "push", "origin", tag_name])
|
@@ -1,18 +1,18 @@
|
|
1
|
-
autopub/__init__.py,sha256=
|
1
|
+
autopub/__init__.py,sha256=7u8F9STpmbbuMyfFx7piaICsAAQ4hd9z4Qjqq78wkfE,7057
|
2
2
|
autopub/cli/__init__.py,sha256=GZ1YNC0UDZqdMfQyNMD4D_D2ItTLcaiJLhPtsLwpH4s,3860
|
3
3
|
autopub/exceptions.py,sha256=gNUbiG3_fVmNjhk2kyueQHPSifNgQf0Bl6IDNvkVhxQ,1534
|
4
4
|
autopub/plugin_loader.py,sha256=i8nz0cmu5eaSRJ2Hx5KxbA-tOMR2mjcz8fdRg4zkGLE,1813
|
5
5
|
autopub/plugins/__init__.py,sha256=57ewn1lhZYKKuVL49l3cgqAN9LQfCRzdsgSZimIAkls,2030
|
6
6
|
autopub/plugins/bump_version.py,sha256=Z6UKEJKdZVn6kACN4nQTJ3253kwAnSm1HpOxq1zHWpw,1413
|
7
|
-
autopub/plugins/git.py,sha256=
|
7
|
+
autopub/plugins/git.py,sha256=d0SMLc6hwuk0eymj8aHyu3_cEd-7x4fhkwu35wPPV4k,1054
|
8
8
|
autopub/plugins/pdm.py,sha256=Pczye06fKg8_HMJDkEfMXQyvao9rZ7sqzTHFd6lLEpU,532
|
9
9
|
autopub/plugins/poetry.py,sha256=d2LvW9RI7ZB3reBOXbcp1mqWmzQ06Uyg_T-MxTvlSBg,517
|
10
10
|
autopub/plugins/update_changelog.py,sha256=g_6flOP5wocZbjOaYSayWxobL3ld8f0wT78nFtAIkFc,1586
|
11
11
|
autopub/plugins/uv.py,sha256=goo8QxaD3FVJ1c3xOSmN1hikZTCUXN8jWNac1S5uDDY,1089
|
12
12
|
autopub/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
13
13
|
autopub/types.py,sha256=gY1WR93XZVFS7vf5JMSmL_h5z7zO51-rtmZ6MYsh3so,1043
|
14
|
-
autopub-1.0.
|
15
|
-
autopub-1.0.
|
16
|
-
autopub-1.0.
|
17
|
-
autopub-1.0.
|
18
|
-
autopub-1.0.
|
14
|
+
autopub-1.0.0a26.dist-info/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
|
15
|
+
autopub-1.0.0a26.dist-info/METADATA,sha256=J8m9bCEKIxfR-jDgaG0pNUAVlGUxy2fYc9atGy0iC4E,951
|
16
|
+
autopub-1.0.0a26.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
17
|
+
autopub-1.0.0a26.dist-info/entry_points.txt,sha256=oeTav5NgCxif6mcZ_HeVGgGv5LzS4DwdI01nr4bO1IM,43
|
18
|
+
autopub-1.0.0a26.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|