You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# The code below will cut version displayed in the dropdown like this:
79
-
# tags like v0.1.0 = > 0.1
80
-
# branch like release/0.1 => 0.1
81
-
# main will remain main
82
-
# if not set will fail back to main
79
+
# By default, set to "main".
80
+
# If it's a tag like refs/tags/v1.2.3-rc4 or refs/tags/v1.2.3, then
81
+
# cut to 1.2
83
82
# the version varible is used in layout.html: https://github.com/pytorch/executorch/blob/main/docs/source/_templates/layout.html#L29
83
+
version=release="main"
84
84
ifet_version_docs:
85
-
# Check if starts with release/ and set the version to the number after slash
86
-
ifet_version_docs.startswith("release/"):
87
-
version=et_version_docs.split("/")[-1]
88
-
else:
89
-
# Remove "v" prefix if present
90
-
ifet_version_docs.startswith("v"):
91
-
et_version_docs=et_version_docs[1:]
92
-
# Split to major, minor, and patch
93
-
version_components=et_version_docs.split(".")
94
-
95
-
# Combine the major and minor version components:
96
-
iflen(version_components) >=2:
97
-
version=release=".".join(version_components[:2])
98
-
else:
99
-
# If there are not enough components, use the full version
0 commit comments