Skip to content

Commit 463c861

Browse files
committed
move patch into script
1 parent eaa6e67 commit 463c861

File tree

3 files changed

+55
-9
lines changed

3 files changed

+55
-9
lines changed

.github/workflows/hugo-site-generator.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,6 @@ jobs:
3939
working-directory: upstream
4040
run: git checkout ${{ inputs.bcrCommitHash }}
4141

42-
- name: Patch upstream docs
43-
working-directory: upstream
44-
run: patch -p1 < ../patches/*.patch
45-
4642
- name: Clean up mdx files
4743
run: ./cleanup-mdx.sh
4844

copy-upstream-docs.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@ if [ ! -d "$SOURCE_DIR" ]; then
5757
exit 1
5858
fi
5959

60+
(
61+
cd upstream
62+
echo "Patching files"
63+
patch -p1 < ../patches/*.patch
64+
)
65+
6066
echo "Finding all .md files in $SOURCE_DIR..."
6167

6268
# Find all .md files and copy them
@@ -84,5 +90,11 @@ find "$SOURCE_DIR" -name "*.md" -type f | while read -r source_file; do
8490
awk -f transform-docs.awk "$source_file" > "$target_file"
8591
done
8692

93+
(
94+
cd upstream
95+
echo "Undoing patches"
96+
git reset --hard
97+
)
98+
8799
echo "Successfully copied all .md files to .mdx files in root"
88100
echo "You can now modify the files as needed."

docs.json

Lines changed: 43 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,25 @@
2121
"groups": [
2222
{
2323
"group": "Why Bazel?",
24-
"pages": ["about/why"]
24+
"pages": [
25+
"about/intro",
26+
"about/why",
27+
"about/vision",
28+
"about/roadmap",
29+
"about/faq"
30+
]
2531
},
2632
{
2733
"group": "Build system basics",
28-
"pages": ["basics"]
34+
"pages": [
35+
"basics",
36+
"basics/build-systems",
37+
"basics/task-based-builds",
38+
"basics/artifact-based-builds",
39+
"basics/distributed-builds",
40+
"basics/dependencies",
41+
"basics/hermeticity"
42+
]
2943
}
3044
]
3145
},
@@ -34,15 +48,39 @@
3448
"groups": [
3549
{
3650
"group": "Install",
37-
"pages": ["install"]
51+
"pages": [
52+
"install",
53+
"install/bazelisk",
54+
"install/os-x",
55+
"install/windows",
56+
"install/ubuntu",
57+
"install/suse",
58+
"install/docker-container",
59+
"install/compile-source",
60+
"install/completion",
61+
"install/ide"
62+
]
3863
},
3964
{
4065
"group": "First build tutorials",
41-
"pages": ["start/getting-started"]
66+
"pages": [
67+
"start/cpp",
68+
"start/java",
69+
"start/android-app",
70+
"start/ios-app"
71+
]
4272
},
4373
{
4474
"group": "Concepts",
45-
"pages": ["concepts/build-files"]
75+
"pages": [
76+
"concepts/build-ref",
77+
"concepts/labels",
78+
"concepts/build-files",
79+
"concepts/dependencies",
80+
"concepts/visibility",
81+
"concepts/platforms",
82+
"concepts/hermeticity"
83+
]
4684
}
4785
]
4886
},

0 commit comments

Comments
 (0)