ci(gitlab-ci): add `rubocop` linter (with `allow_failure`) [skip ci]
[arvados-formula.git] / pre-commit_semantic-release.sh
1 #!/bin/sh
2
3 ###############################################################################
4 # (A) Update `FORMULA` with `${nextRelease.version}`
5 ###############################################################################
6 sed -i -e "s_^\(version:\).*_\1 ${1}_" FORMULA
7
8
9 ###############################################################################
10 # (B) Use `m2r` to convert automatically produced `.md` docs to `.rst`
11 ###############################################################################
12
13 # Install `m2r`
14 pip3 install m2r
15
16 # Copy and then convert the `.md` docs
17 cp ./*.md docs/
18 cd docs/ || exit
19 m2r --overwrite ./*.md
20
21 # Change excess `H1` headings to `H2` in converted `CHANGELOG.rst`
22 sed -i -e '/^=.*$/s/=/-/g' CHANGELOG.rst
23 sed -i -e '1,4s/-/=/g' CHANGELOG.rst
24
25 # Use for debugging output, when required
26 # cat AUTHORS.rst
27 # cat CHANGELOG.rst
28
29 # Return back to the main directory
30 cd ..