Skip to content

Commit 13dd922

Browse files
committed
cleanup more
1 parent b1a70ae commit 13dd922

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

script/release.py

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,8 @@
1313
# limitations under the License.
1414
"""Release script to publish release module to pipy."""
1515

16-
import glob
1716
import os
1817
import sys
19-
from typing import List
2018

2119
CHANGELOG_PATH = os.path.join(os.path.dirname('__file__'), 'CHANGELOG.md')
2220

@@ -38,13 +36,6 @@ def get_new_version():
3836
return line.rstrip()
3937

4038

41-
VERSION_FORMAT = "version = '{}'\n"
42-
43-
44-
def update_version_file(version):
45-
call_bash_script(f'uv version {version}')
46-
47-
4839
def call_bash_script(cmd):
4940
if os.environ.get('DRY_RUN') is not None:
5041
print('{} Calls: {}'.format(MESSAGE_RED.format('[DRY_RUN]'), cmd))
@@ -67,18 +58,12 @@ def ensure_publication(new_version_num):
6758
if os.environ.get('DRY_RUN') is not None:
6859
print('Run with {} mode.'.format(MESSAGE_RED.format('[DRY_RUN]')))
6960

70-
print('Are you sure to release as {}?[y/n]'.format(MESSAGE_YELLOW.format(new_version_num)))
61+
print('Are you sure to publish a new built modules in dist directory as {}?[y/n]'.format(MESSAGE_YELLOW.format(new_version_num)))
7162
for line in sys.stdin:
7263
if line.rstrip().lower() == 'y':
7364
return
7465
sys.exit('Canceled release process.')
7566

76-
def get_py_files_in_dir(root_dir: str) -> List[str]:
77-
return [
78-
file_path[len(root_dir) :]
79-
for file_path in glob.glob(f'{root_dir}/**/*.py', recursive=True) + glob.glob(f'{root_dir}/**/*.typed', recursive=True)
80-
]
81-
8267
def main():
8368
print_current_version()
8469
new_version = get_new_version()

0 commit comments

Comments
 (0)