2023-02-05 16:27:09 +01:00
|
|
|
{
|
|
|
|
writeShellApplication,
|
2023-02-08 12:55:05 +01:00
|
|
|
ownLib,
|
2023-02-05 16:27:09 +01:00
|
|
|
podman
|
|
|
|
}:
|
|
|
|
|
2023-02-08 12:55:05 +01:00
|
|
|
let
|
|
|
|
usePodman = ownLib.onHikari {};
|
|
|
|
runner = if usePodman then "podman" else "docker";
|
2023-02-28 20:20:44 +01:00
|
|
|
image = (if usePodman then "docker.io/" else "") + "t3docs/render-documentation:latest";
|
2023-02-08 12:55:05 +01:00
|
|
|
runtimeInputs = if usePodman then [ podman ] else [ ];
|
|
|
|
|
|
|
|
in writeShellApplication {
|
2023-02-05 16:27:09 +01:00
|
|
|
name = "custom-typo3-render-documentation";
|
|
|
|
|
2023-02-08 12:55:05 +01:00
|
|
|
inherit runtimeInputs;
|
2023-02-05 16:27:09 +01:00
|
|
|
|
|
|
|
# See: https://t3docs.github.io/DRC-The-Docker-Rendering-Container/07-To-be-sorted/quickstart.html#build-html-with-plain-docker-commands
|
|
|
|
text = ''
|
2023-03-01 08:54:44 +01:00
|
|
|
mkdir -p Documentation-GENERATED-temp
|
2023-02-08 12:55:05 +01:00
|
|
|
${runner} \
|
2023-02-05 16:27:09 +01:00
|
|
|
run --rm \
|
|
|
|
-v "$(pwd)":/PROJECT:ro \
|
|
|
|
-v "$(pwd)/Documentation-GENERATED-temp":/RESULT \
|
2023-02-08 12:55:05 +01:00
|
|
|
${image} \
|
2023-02-05 16:27:09 +01:00
|
|
|
makehtml
|
|
|
|
'';
|
|
|
|
}
|