Skip to content

Commit f436996

Browse files
committed
the release script will update the header file with the new version numbers (automatically!!!)
1 parent cf771ea commit f436996

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

script/release.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,19 @@ def topaddedversionstring(major, minor, rev):
9696
print("modified "+cmakefile+", a backup was made")
9797

9898

99+
100+
versionfilerel = os.sep + "include" + os.sep + "fast_float" + os.sep + "float_common.h"
101+
versionfile = maindir + versionfilerel
102+
103+
for line in fileinput.input(versionfile, inplace=1, backup='.bak'):
104+
line = re.sub(r'#define FASTFLOAT_VERSION_MAJOR \d+','#define FASTFLOAT_VERSION_MAJOR '+newmajorversionstring, line.rstrip())
105+
line = re.sub(r'#define FASTFLOAT_VERSION_MINOR \d+','#define FASTFLOAT_VERSION_MAJOR '+mewminorversionstring, line.rstrip())
106+
line = re.sub(r'#define FASTFLOAT_VERSION_PATCH \d+','#define FASTFLOAT_VERSION_MAJOR '+newrevversionstring, line.rstrip())
107+
print(line)
108+
109+
print(versionfile + " modified")
110+
111+
99112
readmefile = maindir + os.sep + "README.md"
100113

101114

0 commit comments

Comments
 (0)