raulcd commented on code in PR #38982:
URL: https://github.com/apache/arrow/pull/38982#discussion_r1408884410
##########
dev/release/utils-update-docs-versions.py:
##########
@@ -38,7 +38,9 @@
else:
release_type = "patch"
-# Update main docs version script
+# Update main docs version script only when compatible version of the
+# stable version isn't change. Compatible version is ${MAJOR}.${MINOR}
Review Comment:
```suggestion
# stable version doesn't change. Compatible version is ${MAJOR}.${MINOR}
```
##########
dev/release/utils-update-docs-versions.py:
##########
@@ -47,23 +49,30 @@
stable_compatible_version = ".".join(split_version[:2])
previous_compatible_version = old_versions[1]["name"].split(" ")[0]
- # Create new versions
- new_versions = [
- {"name": f"{dev_compatible_version} (dev)",
- "version": "dev/",
- "url": "https://arrow.apache.org/docs/dev/"},
- {"name": f"{stable_compatible_version} (stable)",
- "version": "",
- "url": "https://arrow.apache.org/docs/",
- "preferred": True},
- {"name": previous_compatible_version,
- "version": f"{previous_compatible_version}/",
- "url":
f"https://arrow.apache.org/docs/{previous_compatible_version}/"},
- *old_versions[2:],
- ]
- with open(main_versions_path, 'w') as json_file:
- json.dump(new_versions, json_file, indent=4)
- json_file.write("\n")
+ # previous (compatible version) -> stable (compatible version)
+ #
+ # 13.Y.Z (13.Y) -> 14.0.0 (14.0): Update
+ # 14.0.0 (14.0) -> 14.0.1 (14.0): Not update
+ # 13.Y.Z (13.Y) -> 14.0.0 (14.0): Update
+ # 14.0.0 (14.0) -> 14.0.1 (14.0): Not update
Review Comment:
I think this is currently repeated. Did you wanted to add something like
this?
```suggestion
# 13.Y.Z (13.Y) -> 14.0.0 (14.0): Update
# 14.0.0 (14.0) -> 14.0.1 (14.0): Not update
# 14.0.1 (14.0) -> 14.1.0 (14.1): Update
# 14.0.0 (14.0) -> 14.1.0 (14.1): Update
```
##########
dev/release/utils-update-docs-versions.py:
##########
@@ -76,14 +85,19 @@
previous_r_name = old_r_versions[1]["name"].split(" ")[0]
previous_r_version = ".".join(previous_r_name.split(".")[:2])
-if release_type == "major":
+if release_type == "major" and split_version[1:] == ["0", "0"]:
+ # 14.0.0 -> 15.0.0
new_r_versions = [
{"name": f"{dev_r_version} (dev)", "version": "dev/"},
{"name": f"{release_r_version} (release)", "version": ""},
{"name": previous_r_name, "version": f"{previous_r_version}/"},
*old_r_versions[2:],
]
else:
+ # 14.0.1 -> 15.0.0
Review Comment:
isn't this case `release_type == "major" and split_version[1:] == ["0",
"0"]` true due to release `15.0.0`? I am just confused about the comment.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]