63 lines
1.4 KiB
Plaintext
63 lines
1.4 KiB
Plaintext
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', 'symlinks'
|
|
end
|
|
end
|
|
|
|
sector c_rules
|
|
section sites
|
|
list str input
|
|
'index',
|
|
'music',
|
|
'projects/fpc-sitegen',
|
|
'projects/sad',
|
|
'projects/mariebuild',
|
|
'projects/mfd0816/index'
|
|
str input_format 'data/$(%element%).sad'
|
|
str output_format '$(%element%).html'
|
|
|
|
str exec '#!/usr/bin/env bash
|
|
set -e
|
|
|
|
mkdir -p \$(dirname $(%output%))
|
|
|
|
bin/fpc-sitegen -a el -i $(%input%) -o $(%output%)
|
|
|
|
COMMIT_SHORT=\$(git rev-parse --short HEAD)
|
|
BRANCH=\$(git rev-parse --abbrev-ref HEAD)
|
|
DATE=\$(date +%d.%m.%Y)
|
|
TIME=\$(date +%H:%M:%S)
|
|
|
|
sed -i ''s/\\\$\\\$DATE\\\$\\\$/''"\$DATE/g" $(%output%)
|
|
sed -i ''s/\\\$\\\$TIME\\\$\\\$/''"\$TIME/g" $(%output%)
|
|
sed -i ''s@\\\$\\\$BRANCH\\\$\\\$@''"\$BRANCH@g" $(%output%)
|
|
sed -i ''s@\\\$\\\$SOURCE\\\$\\\$@$(%input%)@g'' $(%output%)
|
|
sed -i ''s/\\\$\\\$COMMIT\\\$\\\$/''"\$COMMIT_SHORT/g" $(%output%)
|
|
'
|
|
end
|
|
|
|
section symlinks
|
|
list str input
|
|
'projects/mfd0816/VERSION1_DESIGN',
|
|
'projects/mfd0816/VERSION1_INSTRUCTIONS'
|
|
str input_format 'data/$(%element%)'
|
|
str output_format '$(%element%)'
|
|
|
|
str exec '#!/usr/bin/env bash
|
|
mkdir -p \$(dirname $(%output%))
|
|
|
|
rm $(%output%) 2> /dev/null
|
|
ln $(%input%) $(%output%)
|
|
'
|
|
end
|
|
end
|