autopub 1.0.0a23__tar.gz → 1.0.0a24__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: autopub
3
- Version: 1.0.0a23
3
+ Version: 1.0.0a24
4
4
  Summary: Automatic package release upon pull request merge
5
5
  Home-page: https://github.com/autopub/autopub
6
6
  Author: Justin Mayer
@@ -2,6 +2,8 @@ from __future__ import annotations
2
2
 
3
3
  import hashlib
4
4
  import json
5
+ import subprocess
6
+ import textwrap
5
7
  from functools import cached_property
6
8
  from pathlib import Path
7
9
  from typing import Iterable, Mapping, TypeAlias
@@ -151,6 +153,8 @@ class Autopub:
151
153
  plugin.post_publish(release_info)
152
154
 
153
155
  self._delete_release_file()
156
+ self._commit()
157
+ self._push()
154
158
 
155
159
  def validate_config(self) -> None:
156
160
  errors: dict[str, ValidationError] = {}
@@ -167,6 +171,22 @@ class Autopub:
167
171
  def _delete_release_file(self) -> None:
168
172
  self.release_file.unlink(missing_ok=True)
169
173
 
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
+
170
190
  def _write_artifact(self, release_info: ReleaseInfo) -> None:
171
191
  data = {
172
192
  **release_info.dict(),
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  requires-python = ">=3.9.0,<4.0"
3
- version = "1.0.0-alpha.23"
3
+ version = "1.0.0-alpha.24"
4
4
  name = "autopub"
5
5
  description = "Automatic package release upon pull request merge"
6
6
  authors = [
@@ -25,7 +25,7 @@ classifiers = [
25
25
  repository = "https://github.com/autopub/autopub"
26
26
  include = ["autopub/py.typed"]
27
27
  name = "autopub"
28
- version = "1.0.0-alpha.23"
28
+ version = "1.0.0-alpha.24"
29
29
  description = "Automatic package release upon pull request merge"
30
30
  authors = [
31
31
  "Justin Mayer <entroP@gmail.com>",
File without changes
File without changes
File without changes