update release version

This commit is contained in:
hathach
2023-11-24 16:36:12 +07:00
parent 426f791e7a
commit 031be18e26
4 changed files with 19 additions and 9 deletions

View File

@@ -1,6 +1,6 @@
{ {
"name": "TinyUSB", "name": "TinyUSB",
"version": "0.15.0", "version": "0.16.0",
"description": "TinyUSB is an open-source cross-platform USB Host/Device stack for embedded system, designed to be memory-safe with no dynamic allocation and thread-safe with all interrupt events are deferred then handled in the non-ISR task function.", "description": "TinyUSB is an open-source cross-platform USB Host/Device stack for embedded system, designed to be memory-safe with no dynamic allocation and thread-safe with all interrupt events are deferred then handled in the non-ISR task function.",
"keywords": "usb, host, device", "keywords": "usb, host, device",
"repository": "repository":

View File

@@ -13,5 +13,6 @@ repo.versions:
"0.13.0": "0.13.0" "0.13.0": "0.13.0"
"0.14.0": "0.14.0" "0.14.0": "0.14.0"
"0.15.0": "0.15.0" "0.15.0": "0.15.0"
"0-latest": "0.15.0" "0.16.0": "0.16.0"
"0-latest": "0.16.0"
"0-dev": "0.0.0" "0-dev": "0.0.0"

View File

@@ -30,7 +30,7 @@
#include "common/tusb_compiler.h" #include "common/tusb_compiler.h"
#define TUSB_VERSION_MAJOR 0 #define TUSB_VERSION_MAJOR 0
#define TUSB_VERSION_MINOR 15 #define TUSB_VERSION_MINOR 16
#define TUSB_VERSION_REVISION 0 #define TUSB_VERSION_REVISION 0
#define TUSB_VERSION_STRING TU_STRING(TUSB_VERSION_MAJOR) "." TU_STRING(TUSB_VERSION_MINOR) "." TU_STRING(TUSB_VERSION_REVISION) #define TUSB_VERSION_STRING TU_STRING(TUSB_VERSION_MAJOR) "." TU_STRING(TUSB_VERSION_MINOR) "." TU_STRING(TUSB_VERSION_REVISION)

View File

@@ -1,6 +1,6 @@
import re import re
version = '0.15.0' version = '0.16.0'
print('version {}'.format(version)) print('version {}'.format(version))
ver_id = version.split('.') ver_id = version.split('.')
@@ -9,10 +9,8 @@ ver_id = version.split('.')
# src/tusb_option.h # src/tusb_option.h
################### ###################
f_option_h = 'src/tusb_option.h' f_option_h = 'src/tusb_option.h'
with open(f_option_h) as f: with open(f_option_h) as f:
fdata = f.read() 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_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_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_REVISION *) \d+', r"\1 {}".format(ver_id[2]), fdata)
@@ -33,6 +31,17 @@ if fdata.find(version) < 0:
with open(f_repository_yml, 'w') as f: with open(f_repository_yml, 'w') as f:
f.write(fdata) 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 # docs/info/changelog.rst
################### ###################