### Armbian logs for ${ARMBIAN_BUILD_UUID} #### Armbian build at $(LC_ALL=C LANG=C date) on $(hostname || true) #### Repeat build: ${repeat_args_string:-""} #### ARGs: \`${ARMBIAN_ORIGINAL_ARGV[@]@Q}\` MARKDOWN_HEADER if [[ -n "$(command -v git)" && -d "${SRC}/.git" ]]; then # If in GHA, very unlikely there will be changes, don't waste space. if [[ "${CI}" == "true" ]] && [[ "${GITHUB_ACTIONS}" == "true" ]]; then display_alert "Gathering git info for logs" "Processing git information, GHA version" "debug" cat <<- GIT_MARKDOWN_HEADER_GHA >> "${target_file}" #### Current revision: \`\`\` $(LC_ALL=C LANG=C git --git-dir="${SRC}/.git" log -1 --format=short --decorate) \`\`\` GIT_MARKDOWN_HEADER_GHA else display_alert "Gathering git info for logs" "Processing git information, please wait..." "debug" cat <<- GIT_MARKDOWN_HEADER >> "${target_file}" #### Current revision: \`\`\` $(LC_ALL=C LANG=C git --git-dir="${SRC}/.git" log -1 --format=short --decorate) \`\`\` #### Git status: \`\`\` $(LC_ALL=C LANG=C git --work-tree="${SRC}" --git-dir="${SRC}/.git" status) \`\`\` #### Git changes: \`\`\` $(LC_ALL=C LANG=C git --work-tree="${SRC}" --git-dir="${SRC}/.git" diff -u) \`\`\` GIT_MARKDOWN_HEADER fi fi # FOOTER: Newlines are relevant here. echo -e "\n\n
\`\`\`bash MARKDOWN_LOG_HEADER # GHA has a 1mb limit for Markdown. 500kb of logs, max, from the end. tail --bytes 500000 "${ascii_log_file}" >> "${target_file}" || true echo -e "\n\`\`\`\n\n