Skip to content

Commit 37d3267

Browse files
committed
fix(docs): parse default documentation version
1 parent eadb161 commit 37d3267

4 files changed

Lines changed: 9 additions & 2 deletions

File tree

‎.github/scripts/create-latest-alias.sh‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ latest_path=""
88

99
for version_file in "$versions_dir"/*.yml; do
1010
candidate=$(awk '
11-
$1 == "path:" {
11+
/^path:/ {
1212
path = $2
1313
gsub(/^"|"$/, "", path)
1414
}
15-
$1 == "defaultVersion:" && $2 == "true" {
15+
/^defaultVersion:/ && $2 == "true" {
1616
default_version = 1
1717
}
1818
END {

‎.github/scripts/test-create-latest-alias.sh‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ EOF
1818
cat > "$versions_dir/1.5.0.Final.yml" <<'EOF'
1919
path: "1_5_0_Final"
2020
defaultVersion: true
21+
menu:
22+
- title: "Javadoc"
23+
path: "/apidocs/"
2124
EOF
2225

2326
"$script_dir/create-latest-alias.sh" "$versions_dir" "$site_dir"

‎.github/workflows/check-site.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
pull_request:
55
paths:
66
- docs/**
7+
- .github/scripts/**
8+
- .github/workflows/check-site.yml
79

810
jobs:
911
build:

‎.github/workflows/deploy-site.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on:
55
branches: [ main ] # Switch to the branch which should be deployed to GitHub Pages
66
paths:
77
- docs/**
8+
- .github/scripts/**
9+
- .github/workflows/deploy-site.yml
810
workflow_dispatch:
911

1012
jobs:

0 commit comments

Comments
 (0)