-
Notifications
You must be signed in to change notification settings - Fork 0
/
Justfile
31 lines (28 loc) · 882 Bytes
/
Justfile
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
setup:
#!/usr/bin/env bash
set -euxo pipefail
VENV_PATH="{{justfile_directory()}}/venv/"
cd {{justfile_directory()}};
if [ ! -d $VENV_PATH ]; then
echo "🏡 Setting up new environment";
python3 -m venv $VENV_PATH;
source ${VENV_PATH}bin/activate;
pip install --upgrade pip;
pip install -r requirements.txt;
mkdocs serve
else
echo "🏡 Project already setup. Try serving with \n\`just serve\`";
fi;
## Serve docs locally
serve:
#!/usr/bin/env bash
set -euxo pipefail
VENV_PATH="{{justfile_directory()}}/venv/"
cd {{justfile_directory()}};
if [ ! -d $VENV_PATH ]; then
echo "🏡 it doesn't appear this project has been setup. Try running\n\`just setup\`";
else
echo "🏡 Serving...";
source ${VENV_PATH}bin/activate;
mkdocs serve
fi;