-
Notifications
You must be signed in to change notification settings - Fork 51
Expand file tree
/
Copy pathadd-parent-context-flag.sh
More file actions
executable file
·82 lines (67 loc) · 2.79 KB
/
add-parent-context-flag.sh
File metadata and controls
executable file
·82 lines (67 loc) · 2.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#!/bin/bash
# Script to add page-use-parent-context flag to all Streaming version branches
# Usage: ./add-parent-context-flag.sh
set -e
# Define all branches to update
BRANCHES=(
"feature/rename-streaming-main"
"feature/rename-streaming-23.3"
"feature/rename-streaming-24.1"
"feature/rename-streaming-24.2"
"feature/rename-streaming-24.3"
"feature/rename-streaming-25.1"
"feature/rename-streaming-25.2"
"feature/rename-streaming-25.3"
)
echo "🚀 Starting to add page-use-parent-context flag to all Streaming branches..."
echo ""
for BRANCH in "${BRANCHES[@]}"; do
echo "═══════════════════════════════════════════════════════════════"
echo "📝 Processing branch: $BRANCH"
echo "═══════════════════════════════════════════════════════════════"
# Checkout the branch
git checkout "$BRANCH"
# Check if the flag already exists
if grep -q "page-use-parent-context: true" antora.yml; then
echo "✅ Flag already exists in $BRANCH, skipping..."
echo ""
continue
fi
# Add the flag after "attributes:" line
# Using sed to insert the line
sed -i '' '/^ attributes:$/a\
page-use-parent-context: true
' antora.yml
# Verify the change was made
if grep -q "page-use-parent-context: true" antora.yml; then
echo "✅ Successfully added flag to antora.yml"
# Show the change
echo "📄 Changes:"
git diff antora.yml | head -15
# Commit the change
git add antora.yml
git commit -m "Enable parent context navigation cards
Add page-use-parent-context flag to enable hierarchical navigation
with parent context cards in the UI. This shows the Self-Managed
parent card with Streaming/Connect subcards when viewing Streaming pages.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>"
echo "✅ Committed changes to $BRANCH"
echo ""
else
echo "❌ Failed to add flag to $BRANCH"
echo ""
exit 1
fi
done
echo "═══════════════════════════════════════════════════════════════"
echo "✅ All branches updated successfully!"
echo "═══════════════════════════════════════════════════════════════"
echo ""
echo "📤 Ready to push. Run the following commands to push all branches:"
echo ""
for BRANCH in "${BRANCHES[@]}"; do
echo "git push origin $BRANCH"
done
echo ""
echo "Or push all at once with:"
echo "git push origin $(echo ${BRANCHES[@]})"