Skip to content

Commit

Permalink
Merge pull request #1274 from qstokkink/automated_version_update
Browse files Browse the repository at this point in the history
Automated Version Update
  • Loading branch information
qstokkink authored Feb 14, 2024
2 parents 1a126ff + 64f60ce commit 3ba7ccd
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@
# -- Project information -----------------------------------------------------

project = 'IPv8'
copyright = '2017-2023, Tribler' # Do not change manually! Handled by github_increment_version.py
copyright = '2017-2024, Tribler' # Do not change manually! Handled by github_increment_version.py
author = 'Tribler'

# The short X.Y version
version = '2.12' # Do not change manually! Handled by github_increment_version.py
version = '2.13' # Do not change manually! Handled by github_increment_version.py
# The full version, including alpha/beta/rc tags
release = '2.12.0' # Do not change manually! Handled by github_increment_version.py
release = '2.13.0' # Do not change manually! Handled by github_increment_version.py


# -- General configuration ---------------------------------------------------
Expand Down
10 changes: 5 additions & 5 deletions github_increment_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def modify_setup(file_contents: str, setup_expression: ast.Expr) -> tuple[str, s
old_version = cast(ast.Name, keyword.value).s
version = Version(old_version)

new_vstring = str(version)
new_vstring = [version.major, version.minor, version.micro]
old_version_tag = '.'.join(str(s) for s in new_vstring[:2])
new_vstring[1] += 1
new_version = '.'.join(str(s) for s in new_vstring)
Expand Down Expand Up @@ -327,16 +327,16 @@ def commit_messages_to_names(commit_msg_list: list[str]) -> list[str]:
return sorted(out)


pr = ipv8_repo.create_pull("Automated Version Update",
"Suggested release message\n---\n"
pr = ipv8_repo.create_pull(title="Automated Version Update",
body="Suggested release message\n---\n"
f"Tag version: {new_version_tag}\n"
f"Release title: IPv8 v{new_version_tag}.{total_commits} release\nBody:\n"
f"Includes the first {total_commits} commits (+{commits_since_last} since v{old_version_tag}) for IPv8, containing:\n\n - "
+ ("\n - ".join(commit_messages_to_names([c.commit.message.split('\n')[2]
for c in comparison.commits
if c.commit.message.startswith('Merge')]))),
'master',
'{}:{}'.format(username, 'automated_version_update'), True)
base='master',
head='{}:{}'.format(username, 'automated_version_update'), draft=True)

pr_labels = next(label for label in ipv8_repo.get_labels() if label.name == "automatedpr")
pr.add_to_labels(pr_labels)
2 changes: 1 addition & 1 deletion ipv8/REST/rest_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ async def start(self, port: int = 8085, host: str = '127.0.0.1', api_key: str |
aiohttp_apispec = AiohttpApiSpec(
app=self.root_endpoint.app,
title="IPv8 REST API documentation",
version="v2.12", # Do not change manually! Handled by github_increment_version.py
version="v2.13", # Do not change manually! Handled by github_increment_version.py
url="/docs/swagger.json",
swagger_path="/docs",
)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
description='The Python implementation of the IPV8 library',
long_description=long_description,
long_description_content_type='text/markdown',
version='2.12.0', # Do not change manually! Handled by github_increment_version.py
version='2.13.0', # Do not change manually! Handled by github_increment_version.py
url='https://github.com/Tribler/py-ipv8',
package_data={'': ['*.*']},
packages=find_packages(),
Expand Down

0 comments on commit 3ba7ccd

Please sign in to comment.