Skip to content
Snippets Groups Projects
Verified Commit 7bae5fda authored by Martin Weise's avatar Martin Weise
Browse files

Build all in one script

parent 66813372
Branches
Tags
No related merge requests found
......@@ -231,14 +231,5 @@ teardown:
build-api:
bash .docs/.swagger/swagger-generate.sh
build-mkdocs:
bash .docs/build-website.sh
build-sphinx:
pwd
ls -la .
ls la -la lib
ls la -la lib/python
bash ./lib/python/build-website.sh
docs: build-mkdocs build-sphinx
docs:
bash ./build-docs.sh
......@@ -4,8 +4,25 @@ OVERRIDES_MAIN_HTML=""
SCRIPTS_EXTRA_JS=""
function clean_cache {
echo "Removing cache from directory ./site"
rm -rf ./site
echo "Removing cache from directory ./site ./lib/python/docs/build"
rm -rf ./site ./lib/python/docs/build
}
function generate_sphinx {
BRANCH="release-$1"
echo "==================================================="
echo "Building LIB for version $1 on branch $BRANCH"
echo "==================================================="
git reset --hard && git checkout "$BRANCH"
pip install -r ./requirements.txt > /dev/null
mkdir -p ./final
if [ "$1" = "latest" ]; then
sed -i -e "s/__APPVERSION__/${APP_VERSION}/g" ./lib/python/setup.py ./lib/python/pyproject.toml ./lib/python/docs/conf.py ./lib/python/docs/index.rst ./lib/python/docs/index.rst
fi
sphinx-apidoc -o ./lib/python/docs/source ./lib/python/dbrepo
sphinx-build -M html ./lib/python/docs/ ./lib/python/docs/build/
cp -r ./lib/python/docs/build/html "./final/$1/sphinx"
clean_cache
}
function generate_docs {
......@@ -66,6 +83,7 @@ git fetch
generate_api "latest"
generate_docs "latest"
generate_sphinx "latest"
# versions
for i in "${!versions[@]}"; do
......
#!/bin/bash
python3 -m venv ./lib/python/venv
source ./lib/python/venv/bin/activate
PIPENV_PIPFILE=./lib/python/Pipfile pipenv install --dev
sed -i -e "s/__APPVERSION__/${APP_VERSION}/g" ./lib/python/pyproject.toml ./lib/python/setup.py ./lib/python/README.md ./lib/python/docs/conf.py ./lib/python/docs/index.rst
sphinx-apidoc -o ./lib/python/docs/source ./lib/python/dbrepo
sphinx-build -M html ./lib/python/docs/ ./lib/python/docs/build/
cp -r ./lib/python/docs/build/html ./site/sphinx
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment