Skip to content

Commit e64bbca

Browse files
committed
chore: update patches from latest commit [skip ci]
1 parent 2056e41 commit e64bbca

File tree

79 files changed

+2
-7919
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+2
-7919
lines changed

patches/.github_workflows_create-patches.yml.patch

Lines changed: 0 additions & 118 deletions
Original file line numberDiff line numberDiff line change
@@ -1,123 +1,5 @@
11
diff --git a/.github/workflows/create-patches.yml b/.github/workflows/create-patches.yml
22
new file mode 100644
3-
index 0000000..3f8c07b
4-
--- /dev/null
5-
+++ b/.github/workflows/create-patches.yml
6-
@@ -0,0 +1,43 @@
7-
+name: Create Patches
8-
+
9-
+on:
10-
+ push:
11-
+ branches: [ "main" ]
12-
+
13-
+jobs:
14-
+ generate-patches:
15-
+ runs-on: ubuntu-latest
16-
+
17-
+ steps:
18-
+ - name: Checkout repository
19-
+ uses: actions/checkout@v4
20-
+ with:
21-
+ fetch-depth: 0
22-
+ ref: ${{ github.ref_name }}
23-
+
24-
+ - name: Install build dependencies
25-
+ run: sudo apt-get update && sudo apt-get install -y make
26-
+
27-
+ - name: Run make create-patch
28-
+ run: make create-patch
29-
+
30-
+ - name: Commit and push patch files
31-
+ run: |
32-
+ git config user.name "GitHub Actions"
33-
+ git config user.email "[email protected]"
34-
+
35-
+ if [ -n "$(git status --porcelain patches/)" ]; then
36-
+ git add patches/
37-
+ git commit -m "chore: update patches from latest commit [skip ci]"
38-
+ git push origin HEAD:${GITHUB_REF_NAME}
39-
+ else
40-
+ echo "No changes in patches/ to commit."
41-
+ fi
42-
+ env:
43-
+ GITHUB_REF_NAME: ${{ github.ref_name }}
44-
+
45-
+ - name: Upload patch files as artifact
46-
+ uses: actions/upload-artifact@v4
47-
+ with:
48-
+ name: split-patches
49-
+ path: patches/
50-
diff --git a/.github/workflows/create-patches.yml b/.github/workflows/create-patches.yml
51-
index 3f8c07b..ca1b632 100644
52-
--- a/.github/workflows/create-patches.yml
53-
+++ b/.github/workflows/create-patches.yml
54-
@@ -2,7 +2,7 @@ name: Create Patches
55-
56-
on:
57-
push:
58-
- branches: [ "main" ]
59-
+ branches: [ "cla" ]
60-
61-
jobs:
62-
generate-patches:
63-
@@ -39,5 +39,5 @@ jobs:
64-
- name: Upload patch files as artifact
65-
uses: actions/upload-artifact@v4
66-
with:
67-
- name: split-patches
68-
+ name: patches
69-
path: patches/
70-
diff --git a/.github/workflows/create-patches.yml b/.github/workflows/create-patches.yml
71-
new file mode 100644
72-
index 0000000..ca1b632
73-
--- /dev/null
74-
+++ b/.github/workflows/create-patches.yml
75-
@@ -0,0 +1,43 @@
76-
+name: Create Patches
77-
+
78-
+on:
79-
+ push:
80-
+ branches: [ "cla" ]
81-
+
82-
+jobs:
83-
+ generate-patches:
84-
+ runs-on: ubuntu-latest
85-
+
86-
+ steps:
87-
+ - name: Checkout repository
88-
+ uses: actions/checkout@v4
89-
+ with:
90-
+ fetch-depth: 0
91-
+ ref: ${{ github.ref_name }}
92-
+
93-
+ - name: Install build dependencies
94-
+ run: sudo apt-get update && sudo apt-get install -y make
95-
+
96-
+ - name: Run make create-patch
97-
+ run: make create-patch
98-
+
99-
+ - name: Commit and push patch files
100-
+ run: |
101-
+ git config user.name "GitHub Actions"
102-
+ git config user.email "[email protected]"
103-
+
104-
+ if [ -n "$(git status --porcelain patches/)" ]; then
105-
+ git add patches/
106-
+ git commit -m "chore: update patches from latest commit [skip ci]"
107-
+ git push origin HEAD:${GITHUB_REF_NAME}
108-
+ else
109-
+ echo "No changes in patches/ to commit."
110-
+ fi
111-
+ env:
112-
+ GITHUB_REF_NAME: ${{ github.ref_name }}
113-
+
114-
+ - name: Upload patch files as artifact
115-
+ uses: actions/upload-artifact@v4
116-
+ with:
117-
+ name: patches
118-
+ path: patches/
119-
diff --git a/.github/workflows/create-patches.yml b/.github/workflows/create-patches.yml
120-
new file mode 100644
1213
index 0000000..ca1b632
1224
--- /dev/null
1235
+++ b/.github/workflows/create-patches.yml

patches/Makefile.patch

Lines changed: 2 additions & 190 deletions
Original file line numberDiff line numberDiff line change
@@ -1,193 +1,5 @@
11
diff --git a/Makefile b/Makefile
2-
index e504646..07c1f2c 100644
3-
--- a/Makefile
4-
+++ b/Makefile
5-
@@ -19,6 +19,21 @@ versions:
6-
fi \
7-
done
8-
9-
+create-patch:
10-
+ @mkdir -p patches
11-
+ @echo -e "\e[1;34m[+] Creating and splitting patch from latest commit...\e[0m"
12-
+ @git format-patch -1 HEAD --stdout | awk '\
13-
+ /^diff --git a\// { \
14-
+ if (out) close(out); \
15-
+ fname = $$3; \
16-
+ sub(/^a\//, "", fname); \
17-
+ gsub(/\//, "_", fname); \
18-
+ out = "patches/" fname ".patch"; \
19-
+ } \
20-
+ { if (out) print >> out } \
21-
+ '
22-
+ @echo -e "\e[1;32m[+] Individual patch files saved in patches/\e[0m"
23-
+
24-
PATCH:=./name.patch
25-
patch:
26-
@if [ -f ${PATCH} ]; then \
27-
@@ -32,6 +47,16 @@ patch:
28-
echo -e "\e[1;31m[+] ${PATCH} file does not exist"; \
29-
fi
30-
31-
+patch-all:
32-
+ @for patchfile in patches/*.patch; do \
33-
+ for f in $(wildcard */); do \
34-
+ if [[ -d "$$f" && -f "$$f/Makefile" ]]; then \
35-
+ echo -e "\e[1;35m[+] Patching $$f with $$patchfile\e[0m"; \
36-
+ patch -d $$f --backup-if-mismatch -p2 < "$$patchfile"; \
37-
+ fi \
38-
+ done \
39-
+ done
40-
+
41-
test:
42-
@for DIR_NAME in $(wildcard */); do \
43-
if [ -f $$DIR_NAME/Makefile ]; then \
44-
diff --git a/Makefile b/Makefile
45-
index e504646..07c1f2c 100644
46-
--- a/Makefile
47-
+++ b/Makefile
48-
@@ -19,6 +19,21 @@ versions:
49-
fi \
50-
done
51-
52-
+create-patch:
53-
+ @mkdir -p patches
54-
+ @echo -e "\e[1;34m[+] Creating and splitting patch from latest commit...\e[0m"
55-
+ @git format-patch -1 HEAD --stdout | awk '\
56-
+ /^diff --git a\// { \
57-
+ if (out) close(out); \
58-
+ fname = $$3; \
59-
+ sub(/^a\//, "", fname); \
60-
+ gsub(/\//, "_", fname); \
61-
+ out = "patches/" fname ".patch"; \
62-
+ } \
63-
+ { if (out) print >> out } \
64-
+ '
65-
+ @echo -e "\e[1;32m[+] Individual patch files saved in patches/\e[0m"
66-
+
67-
PATCH:=./name.patch
68-
patch:
69-
@if [ -f ${PATCH} ]; then \
70-
@@ -32,6 +47,16 @@ patch:
71-
echo -e "\e[1;31m[+] ${PATCH} file does not exist"; \
72-
fi
73-
74-
+patch-all:
75-
+ @for patchfile in patches/*.patch; do \
76-
+ for f in $(wildcard */); do \
77-
+ if [[ -d "$$f" && -f "$$f/Makefile" ]]; then \
78-
+ echo -e "\e[1;35m[+] Patching $$f with $$patchfile\e[0m"; \
79-
+ patch -d $$f --backup-if-mismatch -p2 < "$$patchfile"; \
80-
+ fi \
81-
+ done \
82-
+ done
83-
+
84-
test:
85-
@for DIR_NAME in $(wildcard */); do \
86-
if [ -f $$DIR_NAME/Makefile ]; then \
87-
diff --git a/Makefile b/Makefile
88-
index e504646..07c1f2c 100644
89-
--- a/Makefile
90-
+++ b/Makefile
91-
@@ -19,6 +19,21 @@ versions:
92-
fi \
93-
done
94-
95-
+create-patch:
96-
+ @mkdir -p patches
97-
+ @echo -e "\e[1;34m[+] Creating and splitting patch from latest commit...\e[0m"
98-
+ @git format-patch -1 HEAD --stdout | awk '\
99-
+ /^diff --git a\// { \
100-
+ if (out) close(out); \
101-
+ fname = $$3; \
102-
+ sub(/^a\//, "", fname); \
103-
+ gsub(/\//, "_", fname); \
104-
+ out = "patches/" fname ".patch"; \
105-
+ } \
106-
+ { if (out) print >> out } \
107-
+ '
108-
+ @echo -e "\e[1;32m[+] Individual patch files saved in patches/\e[0m"
109-
+
110-
PATCH:=./name.patch
111-
patch:
112-
@if [ -f ${PATCH} ]; then \
113-
@@ -32,6 +47,16 @@ patch:
114-
echo -e "\e[1;31m[+] ${PATCH} file does not exist"; \
115-
fi
116-
117-
+patch-all:
118-
+ @for patchfile in patches/*.patch; do \
119-
+ for f in $(wildcard */); do \
120-
+ if [[ -d "$$f" && -f "$$f/Makefile" ]]; then \
121-
+ echo -e "\e[1;35m[+] Patching $$f with $$patchfile\e[0m"; \
122-
+ patch -d $$f --backup-if-mismatch -p2 < "$$patchfile"; \
123-
+ fi \
124-
+ done \
125-
+ done
126-
+
127-
test:
128-
@for DIR_NAME in $(wildcard */); do \
129-
if [ -f $$DIR_NAME/Makefile ]; then \
130-
diff --git a/Makefile b/Makefile
131-
index 07c1f2c..49323ab 100644
132-
--- a/Makefile
133-
+++ b/Makefile
134-
@@ -21,8 +21,8 @@ versions:
135-
136-
create-patch:
137-
@mkdir -p patches
138-
- @echo -e "\e[1;34m[+] Creating and splitting patch from latest commit...\e[0m"
139-
- @git format-patch -1 HEAD --stdout | awk '\
140-
+ @echo -e "\e[1;34m[+] Creating and splitting patch from latest commit (excluding patches/)...\e[0m"
141-
+ @git diff HEAD^ HEAD -- . ':(exclude)patches/' | awk '\
142-
/^diff --git a\// { \
143-
if (out) close(out); \
144-
fname = $$3; \
145-
diff --git a/Makefile b/Makefile
146-
index e504646..c4ed576 100644
147-
--- a/Makefile
148-
+++ b/Makefile
149-
@@ -19,6 +19,22 @@ versions:
150-
fi \
151-
done
152-
153-
+create-patch:
154-
+ @mkdir -p patches
155-
+ @echo -e "\e[1;34m[+] Creating and splitting patch from branch 'cla' against 'main' (excluding patches/)...\e[0m"
156-
+ @git fetch origin main >/dev/null 2>&1
157-
+ @git diff origin/main...HEAD -- . ':(exclude)patches/' | awk '\
158-
+ /^diff --git a\// { \
159-
+ if (out) close(out); \
160-
+ fname = $$3; \
161-
+ sub(/^a\//, "", fname); \
162-
+ gsub(/\//, "_", fname); \
163-
+ out = "patches/" fname ".patch"; \
164-
+ } \
165-
+ { if (out) print >> out } \
166-
+ '
167-
+ @echo -e "\e[1;32m[+] Patch files saved to ./patches/\e[0m"
168-
+
169-
PATCH:=./name.patch
170-
patch:
171-
@if [ -f ${PATCH} ]; then \
172-
@@ -32,6 +48,16 @@ patch:
173-
echo -e "\e[1;31m[+] ${PATCH} file does not exist"; \
174-
fi
175-
176-
+patch-all:
177-
+ @for patchfile in patches/*.patch; do \
178-
+ for f in $(wildcard */); do \
179-
+ if [[ -d "$$f" && -f "$$f/Makefile" ]]; then \
180-
+ echo -e "\e[1;35m[+] Patching $$f with $$patchfile\e[0m"; \
181-
+ patch -d $$f --backup-if-mismatch -p2 < "$$patchfile"; \
182-
+ fi \
183-
+ done \
184-
+ done
185-
+
186-
test:
187-
@for DIR_NAME in $(wildcard */); do \
188-
if [ -f $$DIR_NAME/Makefile ]; then \
189-
diff --git a/Makefile b/Makefile
190-
index e504646..c4ed576 100644
2+
index e504646..4468b97 100644
1913
--- a/Makefile
1924
+++ b/Makefile
1935
@@ -19,6 +19,22 @@ versions:
@@ -206,7 +18,7 @@ index e504646..c4ed576 100644
20618
+ gsub(/\//, "_", fname); \
20719
+ out = "patches/" fname ".patch"; \
20820
+ } \
209-
+ { if (out) print >> out } \
21+
+ { if (out) print > out } \
21022
+ '
21123
+ @echo -e "\e[1;32m[+] Patch files saved to ./patches/\e[0m"
21224
+

0 commit comments

Comments
 (0)