Skip to content

Commit b419e50

Browse files
committed
Use docs.appimage.org Makefile wrapper
1 parent a1f9584 commit b419e50

File tree

3 files changed

+30
-8
lines changed

3 files changed

+30
-8
lines changed

docs/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
venv/
2+
.venv/
3+
_build/

docs/make.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#! /bin/bash
2+
3+
set -e
4+
5+
CUR_DIR=$(readlink -f $(dirname "$0"))
6+
7+
cd "$CUR_DIR"
8+
9+
VENV="$CUR_DIR"/.venv
10+
11+
if [ ! -d "$VENV" ] || [ ! -e "$VENV"/bin/activate ]; then
12+
echo $(tput bold)$(tput setaf 2)"Creating new virtual environment in $VENV"$(tput sgr0)
13+
PYTHON=python3
14+
which python3.6 &>/dev/null && PYTHON=python3.6
15+
"$PYTHON" -m venv "$VENV"
16+
fi
17+
18+
source "$VENV"/bin/activate
19+
20+
# this snippet should allow us to call pip install only if the requirements file has been touched
21+
if [ ! -f "$VENV"/requirements.txt ] || [ $(sha256sum requirements.txt | cut -d' ' -f1) != $(sha256sum "$VENV"/requirements.txt | cut -d' ' -f1) ]; then
22+
echo $(tput bold)$(tput setaf 2)"Requirements updated, reinstalling"$(tput sgr0)
23+
cp requirements.txt "$VENV"/requirements.txt
24+
pip install -U -r "$VENV"/requirements.txt
25+
fi
26+
27+
make "$@"

travis/build-docs.sh

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)