diff options
author | fauxpark <fauxpark@gmail.com> | 2023-03-29 16:00:41 +1100 |
---|---|---|
committer | fauxpark <fauxpark@gmail.com> | 2023-03-29 16:00:41 +1100 |
commit | 9602938e9ef7b4c4a8c19b29dadde7423daff1f5 (patch) | |
tree | 65c67e35191a7c65520f624f3d55da27f508f9ef /util | |
parent | 4869b8061c187f6476f8f14b839dd2c2c9f74dd2 (diff) | |
parent | 6bdbf77238166e25eb0888c85ad07f0b7dbf16bc (diff) |
Merge remote-tracking branch 'upstream/master' into develop
Diffstat (limited to 'util')
-rwxr-xr-x | util/ci/generate_failure_markdown.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/util/ci/generate_failure_markdown.sh b/util/ci/generate_failure_markdown.sh new file mode 100755 index 0000000000..5f21f06856 --- /dev/null +++ b/util/ci/generate_failure_markdown.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +set -e + +this_script="$(realpath "${BASH_SOURCE[0]}")" +script_dir="$(realpath "$(dirname "$this_script")")" +qmk_firmware_dir="$(realpath "$script_dir/../../")" + +dump_failure_info() { + local failure_file="$1" + local keyboard=$(cat "$failure_file" | grep 'CI Metadata: KEYBOARD=' | cut -d= -f2) + local keymap=$(cat "$failure_file" | grep 'CI Metadata: KEYMAP=' | cut -d= -f2) + echo "## ${keyboard}:${keymap}" + echo "\`\`\`" + cat "$failure_file" | sed -e $'s/\x1b\[[0-9;]*m//g' | grep -v "CI Metadata:" | grep -vP "(Entering|Leaving) directory" + echo "\`\`\`" +} + +for failure_file in $(find "$qmk_firmware_dir/.build" -name 'failed.log.*' | sort); do + dump_failure_info "$failure_file" +done |