Skip to content

Commit f902234

Browse files
committed
fix(docs): fix version regex in assemble-versions.sh to match major.minor dirs
The regex '^[0-9]+$' only matched pure integers but version directories are major.minor (e.g. 1.60). This caused the "promote to latest" step to find nothing, breaking the latest symlink. Updated to match the original generate.sh pattern '^[0-9]+\.[0-9]+$'. jira: trivial risk: nonprod
1 parent 1ca5699 commit f902234

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

scripts/assemble-versions.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ echo "Removing master's latest directory"
3636
rm -rf "${content_dir:?}/latest"
3737

3838
# 4. Find the highest numbered version and promote it to "latest"
39-
highest_version=$(ls -1 "./$content_dir/" | grep -E '^[0-9]+$' | sort -V | tail -n 1)
39+
highest_version=$(ls -1 "./$content_dir/" | grep -E '^[0-9]+\.[0-9]+$' | sort -V | tail -n 1)
4040

4141
if [ -n "$highest_version" ]; then
4242
echo "Promoting version $highest_version to /latest"

0 commit comments

Comments
 (0)