From eea28f0106cf58db9ef0026a663b28579cb60fd0 Mon Sep 17 00:00:00 2001 From: Daniel Tamayo Date: Wed, 25 Oct 2023 06:11:19 -0700 Subject: [PATCH] 3.12.0 --- README.rst | 2 +- doc/conf.py | 4 ++-- setup.py | 4 ++-- src/core.c | 2 +- update_version.py | 28 +++++++++++++++++++++++++--- version.txt | 2 +- 6 files changed, 32 insertions(+), 10 deletions(-) diff --git a/README.rst b/README.rst index 01eedcff..ac9db527 100644 --- a/README.rst +++ b/README.rst @@ -1,4 +1,4 @@ -.. image:: https://img.shields.io/badge/REBOUNDx-v3.11.3-green.svg?style=flat +.. image:: https://img.shields.io/badge/REBOUNDx-v3.12.0-green.svg?style=flat :target: https://reboundx.readthedocs.org .. image:: https://badge.fury.io/py/reboundx.svg :target: https://badge.fury.io/py/reboundx diff --git a/doc/conf.py b/doc/conf.py index f38d2864..d108266e 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -200,9 +200,9 @@ def cleanline(line): # built documents. # # The short X.Y version. -version = '3.11' +version = '3.12' # The full version, including alpha/beta/rc tags. -release = '3.11.3' +release = '3.12.0' # General information about the project. project = u"REBOUNDx ({0})".format(release) diff --git a/setup.py b/setup.py index e8cb5b5a..5c4b9849 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ ghash = subprocess.check_output(["git", "rev-parse", "HEAD"]).decode("ascii") ghash_arg = "-DREBXGITHASH="+ghash.strip() except: - ghash_arg = "-DREBXGITHASH=3c460422864a7a908bec421a53cf532c090a6ffe" #GITHASHAUTOUPDATE + ghash_arg = "-DREBXGITHASH=ab19392285fdb802ce1b8c78e9bac8678c47bd9f" #GITHASHAUTOUPDATE class build_ext(_build_ext): def finalize_options(self): @@ -86,7 +86,7 @@ def finalize_options(self): long_description = f.read() setup(name='reboundx', - version='3.11.3', + version='3.12.0', description='A library for including additional forces in REBOUND', long_description=long_description, url='https://github.com/dtamayo/reboundx', diff --git a/src/core.c b/src/core.c index bbce122b..46e751f9 100644 --- a/src/core.c +++ b/src/core.c @@ -39,7 +39,7 @@ #define str(s) #s const char* rebx_build_str = __DATE__ " " __TIME__; // Date and time build string. -const char* rebx_version_str = "3.11.3"; // **VERSIONLINE** This line gets updated automatically. Do not edit manually. +const char* rebx_version_str = "3.12.0"; // **VERSIONLINE** This line gets updated automatically. Do not edit manually. const char* rebx_githash_str = STRINGIFY(REBXGITHASH); // This line gets updated automatically. Do not edit manually. diff --git a/update_version.py b/update_version.py index 5510da30..9f872ccc 100755 --- a/update_version.py +++ b/update_version.py @@ -68,11 +68,33 @@ with open("doc/conf.py", "w") as f: f.writelines(conflines) +# find changelog +with open("changelog.md") as f: + found_start = 0 + changelog = "" + cl = f.readlines() + for l in cl: + if found_start == 0 and l.startswith("### Version"): + if reboundxversion in l: + found_start = 1 + continue + if found_start == 1 and l.startswith("### Version"): + found_start = 2 + if found_start == 1: + changelog += l + +if found_start != 2 or len(changelog.strip())<5: + raise RuntimeError("Changelog not found") + +with open("_changelog.tmp", "w") as f: + f.writelines(changelog.strip()+"\n") + + print("----") print("Changelog:\n") print(changelog.strip()) print("----") print("Next:") -print("\ngit commit -a -m \""+reboundversion+"\"") -print("git tag "+reboundversion+" && git push --tags") -print("gh release create "+reboundversion+" --notes-file _changelog.tmp") +print("\ngit commit -a -m \""+reboundxversion+"\"") +print("git tag "+reboundxversion+" && git push --tags") +print("gh release create "+reboundxversion+" --notes-file _changelog.tmp") diff --git a/version.txt b/version.txt index d2c96c0a..92536a9e 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -3.11.3 +3.12.0