Allow rechecking a patchset about docs
[ci-management.git] / jjb / doc / doc-post-rtd.sh
1 #!/bin/bash
2 if [ "$GERRIT_BRANCH" == "master" ]; then
3     RTD_BUILD_VERSION=latest
4 else
5     RTD_BUILD_VERSION="${{GERRIT_BRANCH/\//-}}"
6 fi
7
8 # shellcheck disable=SC1083
9 curl -X POST \
10     -d "branches=$RTD_BUILD_VERSION" \
11     -d "token=$DOCS_RTD_TOKEN"  \
12     https://readthedocs.org/api/v2/webhook/{rtdproject}