summaryrefslogtreecommitdiff
path: root/build-aux/ci/ci-log-logfiles
blob: 1d1714868210e567346ec0312332684aea068d72 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#! /bin/sh

generate_secure_token() {
    echo head --bytes 64 /dev/urandom | sha512sum --binary | cut --fields 1 --delimiter ' '
}

dump_log () {
    if [ -s "$1" ]; then
        stop_command_token="$(generate_secure_token)"
        echo "::group::$1"
        echo "::stop-commands::$stop_command_token"
        cat "$1"
        echo "::$stop_command_token::"
        echo '::endgroup::'
        unset stop_command_token
    fi
}

dump_log config.log
find . -name 'test-suite*.log' -printf '%P\n' | while read -r ts; do
    dump_log "$ts"
done