File: build_docs.bash

package info (click to toggle)
cclib-data 1.6.2-2
  • links: PTS, VCS
  • area: non-free
  • in suites: bookworm, bullseye, sid
  • size: 87,912 kB
  • sloc: python: 16,440; sh: 131; makefile: 79; cpp: 31
file content (33 lines) | stat: -rw-r--r-- 792 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/env bash

# build_docs.sh: Build the documentation as part of Travis CI.

set -o errexit

bold=$(tput bold)
normal=$(tput sgr0)

if [ -z ${DOCS_BUILD_DIR+x} ]; then
    echo "${bold}\$DOCS_BUILD_DIR is not set!${normal}"
    exit 1
elif [ -z ${THEME_DIR+x} ]; then
    echo "${bold}\$THEME_DIR is not set!${normal}"
    exit 1
fi

git clone -b cclib \
    "https://git@github.com/cclib/sphinx_rtd_theme.git" \
    "${THEME_DIR}"/sphinx_rtd_theme

install -dm755 "${DOCS_BUILD_DIR}"
touch "${DOCS_BUILD_DIR}"/.nojekyll

pushd "${DOCS_BUILD_DIR}"/../..
make default
popd

TEST_COVERAGE_DIR="${TRAVIS_BUILD_DIR}/htmlcov"
if [[ -d "${TEST_COVERAGE_DIR}" ]]; then
    echo "${bold}Copying test coverage results...${normal}"
    mv "${TEST_COVERAGE_DIR}" "${DOCS_BUILD_DIR}"/coverage
fi