Skip to content

Commit

Permalink
Merge pull request #285 from fastfloat/fix_release_script
Browse files Browse the repository at this point in the history
the release script will update the header file with the new version numbers (automatically!!!)
  • Loading branch information
lemire authored Nov 22, 2024
2 parents cf771ea + f436996 commit 54782eb
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions script/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"


Expand Down

0 comments on commit 54782eb

Please sign in to comment.