summaryrefslogtreecommitdiff
path: root/tools/make_release.py
diff options
context:
space:
mode:
authorHiFiPhile <[email protected]>2024-04-26 13:12:56 +0200
committerHiFiPhile <[email protected]>2024-04-26 13:12:56 +0200
commit9ef3755f0316d25864d3ac3a49a2523eabfddf8a (patch)
tree4fb337482662308674101d5269192b7a4fe58f91 /tools/make_release.py
parentf88a5bb03b2504df272d2cd285b17e66f11dfc64 (diff)
parent69313ef45564cc8967575f47fb8c57371cbea470 (diff)
Merge branch 'master' of https://github.com/hathach/tinyusb into pr/2283
Diffstat (limited to 'tools/make_release.py')
-rw-r--r--tools/make_release.py21
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
###################