2024-09-08 18:28:26 +02:00
|
|
|
sector config
|
|
|
|
section mariebuild
|
|
|
|
str build_type 'incremental'
|
|
|
|
|
|
|
|
list str targets 'static'
|
|
|
|
str default 'static'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
sector targets
|
|
|
|
section static
|
|
|
|
list str c_rules 'sites'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
sector c_rules
|
|
|
|
section sites
|
2024-09-10 00:00:27 +02:00
|
|
|
list str input 'index', 'projects/fpc-sitegen', 'projects/sad'
|
2024-09-08 18:28:26 +02:00
|
|
|
str input_format 'data/$(%element%).sad'
|
|
|
|
str output_format '$(%element%).html'
|
|
|
|
|
2024-09-09 23:06:19 +02:00
|
|
|
str exec '#!/usr/bin/env bash
|
2024-09-10 00:00:27 +02:00
|
|
|
set -e
|
|
|
|
|
|
|
|
mkdir -p \$(dirname $(%output%))
|
2024-09-09 23:06:19 +02:00
|
|
|
|
2024-09-23 08:05:14 +02:00
|
|
|
bin/fpc-sitegen -a el -i $(%input%) -o $(%output%)
|
2024-09-09 23:06:19 +02:00
|
|
|
|
|
|
|
COMMIT_SHORT=\$(git rev-parse --short HEAD)
|
2024-09-09 23:18:27 +02:00
|
|
|
BRANCH=\$(git rev-parse --abbrev-ref HEAD)
|
2024-09-09 23:06:19 +02:00
|
|
|
DATE=\$(date +%d.%m.%Y)
|
|
|
|
TIME=\$(date +%H:%M:%S)
|
|
|
|
|
|
|
|
sed -i ''s/\\\$\\\$DATE\\\$\\\$/''"\$DATE/g" $(%output%)
|
|
|
|
sed -i ''s/\\\$\\\$TIME\\\$\\\$/''"\$TIME/g" $(%output%)
|
2024-09-09 23:18:27 +02:00
|
|
|
sed -i ''s@\\\$\\\$BRANCH\\\$\\\$@''"\$BRANCH@g" $(%output%)
|
2024-09-09 23:06:19 +02:00
|
|
|
sed -i ''s@\\\$\\\$SOURCE\\\$\\\$@$(%input%)@g'' $(%output%)
|
|
|
|
sed -i ''s/\\\$\\\$COMMIT\\\$\\\$/''"\$COMMIT_SHORT/g" $(%output%)
|
|
|
|
'
|
2024-09-08 18:28:26 +02:00
|
|
|
end
|
|
|
|
end
|