mirror of
https://github.com/saltstack-formulas/sysctl-formula.git
synced 2024-11-27 20:57:49 +01:00
d926b8592d
* Automated using https://github.com/myii/ssf-formula/pull/404
31 lines
908 B
Bash
Executable File
31 lines
908 B
Bash
Executable File
#!/bin/sh
|
|
|
|
###############################################################################
|
|
# (A) Update `FORMULA` with `${nextRelease.version}`
|
|
###############################################################################
|
|
sed -i -e "s_^\(version:\).*_\1 ${1}_" FORMULA
|
|
|
|
|
|
###############################################################################
|
|
# (B) Use `m2r2` to convert automatically produced `.md` docs to `.rst`
|
|
###############################################################################
|
|
|
|
# Install `m2r2`
|
|
pip3 install m2r2
|
|
|
|
# Copy and then convert the `.md` docs
|
|
cp ./*.md docs/
|
|
cd docs/ || exit
|
|
m2r2 --overwrite ./*.md
|
|
|
|
# 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 ..
|