summaryrefslogtreecommitdiffstats
path: root/jjb/doc/doc-post-rtd.sh
blob: 78b8d0b56108a9453cf5c6f6863f82c9875d6459 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/bash
if [ "$GERRIT_BRANCH" == "master" ]; then
    RTD_BUILD_VERSION=latest
else
    RTD_BUILD_VERSION="${{GERRIT_BRANCH/\//-}}"
fi

# shellcheck disable=SC1083
curl -X POST \
    -d "branches=$RTD_BUILD_VERSION" \
    -d "token=$DOCS_RTD_TOKEN"  \
    https://readthedocs.org/api/v2/webhook/{rtdproject}