kou commented on code in PR #38982:
URL: https://github.com/apache/arrow/pull/38982#discussion_r1408902332
##########
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:
Oh, I wanted to write "isn't changed". Is it natural English?
```suggestion
# stable version isn't changed. Compatible version is ${MAJOR}.${MINOR}
```
##########
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:
It's false:
* `version = "14.0.1"`
* `split_version = ["14", "0", "1"]` <- `split_version[1:] == ["0", "1"]`
not `["0", "0"]`
* `next_version = "15.0.0"`
* `split_next_version = ["15", "0", "0"]`
* `release_type = "major"`
##########
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:
Oh, yes. You're right. But I wanted to use different order:
```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.0 (14.0) -> 14.1.0 (14.1): Update
# 14.0.1 (14.0) -> 14.1.0 (14.1): Update
```
--
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]