-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1890 from hathach/release-0.15.0
update version to 0.15.0
- Loading branch information
Showing
5 changed files
with
136 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import re | ||
|
||
version = '0.15.0' | ||
|
||
print('version {}'.format(version)) | ||
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) | ||
|
||
# Write the file out again | ||
with open(f_option_h, 'w') as f: | ||
f.write(fdata) | ||
|
||
################### | ||
# repository.yml | ||
################### | ||
f_repository_yml = 'repository.yml' | ||
with open(f_repository_yml) as f: | ||
fdata = f.read() | ||
|
||
if fdata.find(version) < 0: | ||
fdata = re.sub(r'("0-latest"): "\d+\.\d+\.\d+"', r'"{}": "{}"\r\n \1: "{}"'.format(version, version, version), fdata) | ||
with open(f_repository_yml, 'w') as f: | ||
f.write(fdata) | ||
|
||
################### | ||
# docs/info/changelog.rst | ||
################### | ||
|
||
print("Update docs/info/changelog.rst") |