Other: Update release notes.

This commit is contained in:
Romain LE JEUNE
2022-12-14 11:06:51 +01:00
parent 792317e945
commit 7a814faed2
6 changed files with 353 additions and 53 deletions

View File

@ -34,5 +34,15 @@ if ! which pandoc; then
exit 1
fi
# Check Pandoc version
PANDOC_VERSION=`pandoc --version | grep --color=never -m 1 "pandoc" | sed -nre 's/^[^0-9]*(([0-9]+\.)*[0-9]+).*/\1/p'`
# self-contained is deprecated since 2.19 in profit of --embed-resource option
DEPRECATING_VERSION="2.19.0"
# Build release notes
pandoc "$INFILE" -f markdown -t html -s -o "$OUTFILE" -c utils/release_notes.css --self-contained --section-divs --metadata title="Release notes - Proton Mail Bridge - $CHANNEL"
if [ "$(printf '%s\n' "$requiredver" "$PANDOC_VERSION" | sort -V | head -n1)" = "$DEPRECATING_VERSION" ]; then
pandoc "$INFILE" -f markdown -t html -s -o "$OUTFILE" -c utils/release_notes.css --self-contained --section-divs --metadata title="Release notes - Proton Mail Bridge - $CHANNEL"
else
pandoc "$INFILE" -f markdown -t html -s -o "$OUTFILE" -c utils/release_notes.css --embed-resource --standalone --section-divs --metadata title="Release notes - Proton Mail Bridge - $CHANNEL"
fi