diff options
| author | Michael Fischer <[email protected]> | 2024-02-04 10:55:34 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-02-04 10:55:34 +0100 |
| commit | ea30041168d19a9239b700b745e7d7f17c760a8d (patch) | |
| tree | ff30e202d98c29ef0df73e30ea75ed136f827f80 /tools/make_release.py | |
| parent | 9063ede25f4a013dae8edccc2d953ba2de7ed684 (diff) | |
| parent | f918406a12cabbc66a6c297b2fd27f8eda357fcd (diff) | |
Merge branch 'hathach:master' into nxp_k64
Diffstat (limited to 'tools/make_release.py')
| -rw-r--r-- | tools/make_release.py | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/tools/make_release.py b/tools/make_release.py index 7481e8864..256ca8f21 100644 --- a/tools/make_release.py +++ b/tools/make_release.py @@ -1,6 +1,6 @@ import re -version = '0.15.0' +version = '0.16.0' print('version {}'.format(version)) ver_id = version.split('.') @@ -9,13 +9,11 @@ ver_id = version.split('.') # src/tusb_option.h ################### f_option_h = 'src/tusb_option.h' - with open(f_option_h) as f: fdata = f.read() - -fdata = re.sub(r'(#define TUSB_VERSION_MAJOR *) \d+', r"\1 {}".format(ver_id[0]), fdata) -fdata = re.sub(r'(#define TUSB_VERSION_MINOR *) \d+', r"\1 {}".format(ver_id[1]), fdata) -fdata = re.sub(r'(#define TUSB_VERSION_REVISION *) \d+', r"\1 {}".format(ver_id[2]), fdata) + fdata = re.sub(r'(#define TUSB_VERSION_MAJOR *) \d+', r"\1 {}".format(ver_id[0]), fdata) + fdata = re.sub(r'(#define TUSB_VERSION_MINOR *) \d+', r"\1 {}".format(ver_id[1]), fdata) + fdata = re.sub(r'(#define TUSB_VERSION_REVISION *) \d+', r"\1 {}".format(ver_id[2]), fdata) # Write the file out again with open(f_option_h, 'w') as f: @@ -34,6 +32,17 @@ if fdata.find(version) < 0: f.write(fdata) ################### +# library.json +################### +f_library_json = 'library.json' +with open(f_library_json) as f: + fdata = f.read() + fdata = re.sub(r'( {4}"version":) "\d+\.\d+\.\d+"', rf'\1 "{version}"', fdata) + +with open(f_library_json, 'w') as f: + f.write(fdata) + +################### # docs/info/changelog.rst ################### |
