Commit 13d75ffe authored by Dominik Charousset's avatar Dominik Charousset

Update version to 0.18, introduce -dev versions

Bumping the release version allows early adopters to start integrating
new features with version checks. To mark these releases as development
version, we tag all unreleased version with '-dev+exp.sha.$commit' when
building the manual.
parent a965a4c9
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
/// Denotes version of CAF in the format {MAJOR}{MINOR}{PATCH}, /// Denotes version of CAF in the format {MAJOR}{MINOR}{PATCH},
/// whereas each number is a two-digit decimal number without /// whereas each number is a two-digit decimal number without
/// leading zeros (e.g. 900 is version 0.9.0). /// leading zeros (e.g. 900 is version 0.9.0).
#define CAF_VERSION 1703 #define CAF_VERSION 1800
/// Defined to the major version number of CAF. /// Defined to the major version number of CAF.
#define CAF_MAJOR_VERSION (CAF_VERSION / 10000) #define CAF_MAJOR_VERSION (CAF_VERSION / 10000)
......
...@@ -28,7 +28,6 @@ conf_dir = pathlib.Path(__file__).parent.absolute() ...@@ -28,7 +28,6 @@ conf_dir = pathlib.Path(__file__).parent.absolute()
root_dir = conf_dir.parent.absolute() root_dir = conf_dir.parent.absolute()
# Fetch the CAF version. # Fetch the CAF version.
import re
with open(os.path.join(root_dir, "libcaf_core/caf/config.hpp")) as f: with open(os.path.join(root_dir, "libcaf_core/caf/config.hpp")) as f:
match = re.search('^#define CAF_VERSION ([0-9]+)$', f.read(), re.MULTILINE) match = re.search('^#define CAF_VERSION ([0-9]+)$', f.read(), re.MULTILINE)
if match == None: if match == None:
...@@ -42,7 +41,14 @@ with open(os.path.join(root_dir, "libcaf_core/caf/config.hpp")) as f: ...@@ -42,7 +41,14 @@ with open(os.path.join(root_dir, "libcaf_core/caf/config.hpp")) as f:
# We're building a stable release if the last commit message is # We're building a stable release if the last commit message is
# "Change version to <version>". # "Change version to <version>".
repo = git.Repo(root_dir) repo = git.Repo(root_dir)
is_stable = repo.head.commit.message.startswith("Change version to " + version) is_stable = False
# We're building a stable release if this version has a release date.
with open(os.path.join(root_dir, "CHANGELOG.md")) as f:
match = re.search('^## \[' + version + '\] - [0-9]{4}-[0-9]{2}-[0-9]{2}$',
f.read(), re.MULTILINE)
if match != None:
is_stable = True
# Generate the full version, including alpha/beta/rc tags. For stable releases, # Generate the full version, including alpha/beta/rc tags. For stable releases,
# this is always the same as the CAF version. # this is always the same as the CAF version.
...@@ -51,7 +57,7 @@ if is_stable: ...@@ -51,7 +57,7 @@ if is_stable:
else: else:
last_commit_full = str(repo.head.commit) last_commit_full = str(repo.head.commit)
last_commit = last_commit_full[:7] last_commit = last_commit_full[:7]
release = version + "+exp.sha." + last_commit release = version + "-dev+exp.sha." + last_commit
# -- Enable Sphinx to find the literal includes ------------------------------- # -- Enable Sphinx to find the literal includes -------------------------------
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment