forked from armbian/build
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WiP: board-docs: very initial hook
board_docs
, after image build
- Loading branch information
Showing
2 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# | ||
# SPDX-License-Identifier: GPL-2.0 | ||
# Copyright (c) 2023 Ricardo Pardini <ricardo@pardini.net> | ||
# This file is a part of the Armbian Build Framework https://github.com/armbian/build/ | ||
# | ||
|
||
function prepare_board_docs_via_exts() { | ||
# Run the hooks, which writes to stdout, in a subshell, and capture stdout into a variable. | ||
declare board_docs="" | ||
board_docs="$( | ||
call_extension_method "board_docs" <<- 'BOARD_DOCS' | ||
*write documentation about the board/branch combination* | ||
you should write Markdown to stdout. it runs late in the build process. output will be processed and rendered into ANSI/HTML. | ||
BOARD_DOCS | ||
)" | ||
|
||
if [[ "${board_docs}" != "" ]]; then | ||
display_alert "Board documentation" "${board_docs}" "info" | ||
fi | ||
} | ||
|
||
function post_build_image__board_docs() { | ||
prepare_board_docs_via_exts || true # don't fail | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters