Skip to content

Commit 37fdd2b

Browse files
MarkDaoustcopybara-github
authored andcommitted
update version updater to not be so picky.
PiperOrigin-RevId: 252863637
1 parent 522751b commit 37fdd2b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tools/release_tools/update_versions.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424

2525
EXTS = [".ipynb",".md",".yaml",".html"]
2626
EXPAND_TABLES = [
27-
"site/en/install/source_windows.md",
28-
"site/en/install/source.md",]
27+
"source_windows.md",
28+
"source.md",]
2929

3030
class Version(object):
3131
def __init__(self, in_string):
@@ -51,9 +51,9 @@ def short(self):
5151
args = parser.parse_args()
5252

5353
for ext in EXTS:
54-
for file_path in pathlib.Path("site/en").glob("**/*"+ext):
54+
for file_path in pathlib.Path(".").rglob("*"+ext):
5555
content = file_path.read_text()
56-
if str(file_path) in EXPAND_TABLES:
56+
if file_path.name in EXPAND_TABLES:
5757
content = re.sub("(<tr>.*?){}(.*?</tr>)".format(re.escape(args.old_version.short())),
5858
r"\g<1>{}\g<2>\n\g<0>".format(args.new_version.short()), content)
5959
file_path.write_text(content)

0 commit comments

Comments
 (0)