diff --git a/script/release.py b/script/release.py index bfc3f2af..064a10e1 100755 --- a/script/release.py +++ b/script/release.py @@ -96,6 +96,19 @@ def topaddedversionstring(major, minor, rev): print("modified "+cmakefile+", a backup was made") + +versionfilerel = os.sep + "include" + os.sep + "fast_float" + os.sep + "float_common.h" +versionfile = maindir + versionfilerel + +for line in fileinput.input(versionfile, inplace=1, backup='.bak'): + line = re.sub(r'#define FASTFLOAT_VERSION_MAJOR \d+','#define FASTFLOAT_VERSION_MAJOR '+newmajorversionstring, line.rstrip()) + line = re.sub(r'#define FASTFLOAT_VERSION_MINOR \d+','#define FASTFLOAT_VERSION_MAJOR '+mewminorversionstring, line.rstrip()) + line = re.sub(r'#define FASTFLOAT_VERSION_PATCH \d+','#define FASTFLOAT_VERSION_MAJOR '+newrevversionstring, line.rstrip()) + print(line) + +print(versionfile + " modified") + + readmefile = maindir + os.sep + "README.md"