Files
open-source-firmware-valida…/scripts/create-docs.sh
Danik Klimuk 38906581c4 Add gitcliff and reuse fix (#633)
* add git-cliff and reuse

Files that do not support comments or that have problems adding comments
at the first line should have a separate .license file or a rule inside
REUSE.toml (in case there are a lot of such files).

.robot files generally support comments at the first line, but robotidy
does not want comments to start at first line. It wants so, that everything
that is located before first section should be placed inside "Comments"
section. But reuse does not support license headers in any sections. So
reuse and robotidy have a conflict here.

Because there are a lot of .robot files, I have decided to add them into
REUSE.toml instead of separate .license files or robotidy exceptions.

Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com>

* add LICENSES and license headers to files

Files that does not have license headers have either .license file or a
rule inside REUSE.toml.

Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com>

* .github: ISSUE_TEMPLATE: fix markdownlint

Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com>

* README: add git-cliff and reuse

Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com>

---------

Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com>
2024-12-17 18:49:05 +01:00

26 lines
577 B
Bash
Executable File

#!/usr/bin/env bash
# SPDX-FileCopyrightText: 2024 3mdeb <contact@3mdeb.com>
#
# SPDX-License-Identifier: Apache-2.0
TEMP_DIR=$(mktemp -d)
FILE_NAME="$TEMP_DIR/all-keywords.robot"
python3 scripts/create-docs.py $FILE_NAME
libdoc "$TEMP_DIR/all-keywords.robot" "$TEMP_DIR/all-keywords.html" >/dev/null 2>&1
if [ $? -ne 0 ]; then
echo "libdoc command failed"
exit 1
fi
cp "$TEMP_DIR/all-keywords.html" ./docs/index.html
rm "$TEMP_DIR/all-keywords.robot"
rm "$TEMP_DIR/all-keywords.html"
rmdir "$TEMP_DIR"
echo "Documentation generated and saved as ./docs/index.html"