You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
_status "Determined binary name as: $FOXHOUND_NAME"
238
286
if [ -z"$SKIP_BUILD" ];then
239
287
_build_foxhound
240
288
fi
289
+
if [ -n"$APPLY_PATCHES" ] &&((${#PATCH_FILES[@]}));then
290
+
_status "Reverting ${#PATCH_FILES[@]} patches after successfull build"
291
+
_revert_patches
292
+
fi
241
293
if [ -z"$SKIP_PACKAGE" ];then
242
294
_package_foxhound
243
295
fi
@@ -246,7 +298,7 @@ main() {
246
298
_help() {
247
299
echo"Builds project foxhound"
248
300
echo
249
-
echo"Syntax: build.sh [-c|s|t|u|v|b|r|p|g|n|h]"
301
+
echo"Syntax: build.sh [-c|s|t|u|v|b|r|p|g|n|a|h]"
250
302
echo
251
303
echo"For example, to build from scratch with playwright:"
252
304
echo"> bash build.sh -p"
@@ -262,19 +314,23 @@ _help() {
262
314
echo"p Builds with playwright integration."
263
315
echo"g Create a Git commit with the playwright patches."
264
316
echo"n Dry run. Only print the step the script would perform."
317
+
echo"a Apply patches provided in env variable FOXHOUND_PATCHES: ${FOXHOUND_PATCHES} as a semicolon separated list"
265
318
echo"h Print this Help."
266
319
echo
267
320
echo
268
321
echo"Environment variables:"
269
322
echo
323
+
echo"FOXHOUND_PATCHES:"
324
+
echo"Combined with the -a flag, this splits the content into a list of semicolon separated patch files that we apply before the build and revert afterwards."
325
+
echo
270
326
echo"These are meant to be used if you know what you are doing and can lead to states that are difficult to revert. Use with caution!"
271
327
echo
272
328
echo"SKIP_GIT_CHECK:"
273
329
echo"If set to any value this skips the check whether the git repository is dirty."
274
330
echo"Warning: When used together with Playwright support this can lead to a state where untangling the Playwright patches from your changes to commit them is very cumbersome!"
275
331
}
276
332
277
-
whilegetopts"hpcstuvrbgn" option;do
333
+
whilegetopts"hpcstuvrbgna" option;do
278
334
case"$option"in
279
335
h)
280
336
_help
@@ -299,6 +355,8 @@ while getopts "hpcstuvrbgn" option; do
0 commit comments