add branch and source link to template
This commit is contained in:
parent
ac0e1071ea
commit
9c6146d2c1
2
build.mb
2
build.mb
|
@ -24,11 +24,13 @@ sector c_rules
|
|||
bin/fpc-sitegen -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%)
|
||||
'
|
||||
|
|
|
@ -58,7 +58,7 @@ output-format:
|
|||
|
||||
<br>
|
||||
|
||||
<p> Last generated @ $$DATE$$, $$TIME$$ ; source $$SOURCE$$ @ commit $$COMMIT$$ </p>
|
||||
<p id="gen-info"> Last generated @ $$DATE$$, $$TIME$$ ; source <a href="https://git.heroin.trade/marie/website/src/branch/$$BRANCH$$/$$SOURCE$$">$$SOURCE$$</a> @ commit <a href="https://git.heroin.trade/marie/website/commit/$$COMMIT$$">$$COMMIT$$</a> </p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
|
Loading…
Reference in a new issue