Skip to content

Commit 86de18a

Browse files
committed
move patch into script
1 parent 9b2624c commit 86de18a

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
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."

0 commit comments

Comments
 (0)