Skip to content

Commit 9eba395

Browse files
committed
Fix generate-patch script
1 parent 786e4a7 commit 9eba395

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

script/generate-patch

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,16 @@ if [ $# -ne 1 ]; then
88
fi
99

1010
FILE=Sources/$1/Generated.swift
11-
NEW_HEADER=$(cat <<EOF
12-
--- a/$FILE
13-
+++ b/$FILE
14-
EOF)
1511

1612
cp $FILE $FILE.modified
1713
swift run WebIDLToSwift --no-patch
18-
git diff --no-ext-diff --no-index $FILE $FILE.modified | tail -n +5 | sed "s/^/$NEW_HEADER/" | sed 's/[[:space:]]*$//'
14+
15+
cat <<EOF > "Patches/$1.patch"
16+
--- a/$FILE
17+
+++ b/$FILE
18+
EOF
19+
20+
git diff --no-ext-diff --no-index $FILE $FILE.modified | tail -n +5 | sed 's/[[:space:]]*$//' >> "Patches/$1.patch"
21+
1922
swift run WebIDLToSwift
2023
rm $FILE.modified

0 commit comments

Comments
 (0)