2019-05-13 17:36:25 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
# (A) Update `FORMULA` with `${nextRelease.version}`
|
|
|
|
###############################################################################
|
|
|
|
sed -i -e "s_^\(version:\).*_\1 ${1}_" FORMULA
|
|
|
|
|
|
|
|
|
|
|
|
###############################################################################
|
2022-01-17 09:15:32 +01:00
|
|
|
# (B) Use `m2r2` to convert automatically produced `.md` docs to `.rst`
|
2019-05-13 17:36:25 +02:00
|
|
|
###############################################################################
|
|
|
|
|
2022-01-17 09:15:32 +01:00
|
|
|
# Install `m2r2`
|
|
|
|
pip3 install m2r2
|
2019-05-13 17:36:25 +02:00
|
|
|
|
|
|
|
# Copy and then convert the `.md` docs
|
2019-11-27 22:02:31 +01:00
|
|
|
cp ./*.md docs/
|
|
|
|
cd docs/ || exit
|
2022-01-17 09:15:32 +01:00
|
|
|
m2r2 --overwrite ./*.md
|
2019-05-13 17:36:25 +02:00
|
|
|
|
|
|
|
# Change excess `H1` headings to `H2` in converted `CHANGELOG.rst`
|
|
|
|
sed -i -e '/^=.*$/s/=/-/g' CHANGELOG.rst
|
|
|
|
sed -i -e '1,4s/-/=/g' CHANGELOG.rst
|
|
|
|
|
|
|
|
# Use for debugging output, when required
|
|
|
|
# cat AUTHORS.rst
|
|
|
|
# cat CHANGELOG.rst
|
|
|
|
|
|
|
|
# Return back to the main directory
|
|
|
|
cd ..
|