Skip to content

Commit

Permalink
Split startup scripts for less rebuild (#87)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdegat01 committed Jul 3, 2024
1 parent edfe682 commit 4b55c38
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 6 deletions.
6 changes: 0 additions & 6 deletions supervisor/rootfs/usr/bin/devcontainer_bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@

set -e

bash /usr/bin/supervisor_bootstrap

pip3 install -U setuptools pip
pip3 install -r requirements.txt -r requirements_tests.txt
pip3 install tox

pre-commit install

exit 0
23 changes: 23 additions & 0 deletions supervisor/rootfs/usr/bin/devcontainer_setup
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env bash

set -e

bash /usr/bin/supervisor_bootstrap

if [ ! -n "$VIRTUAL_ENV" ]; then
if [ -x "$(command -v uv)" ]; then
uv venv venv
else
python3 -m venv venv
fi
source venv/bin/activate
fi

if ! [ -x "$(command -v uv)" ]; then
python3 -m pip install uv
fi

bash /usr/bin/devcontainer_bootstrap

git config --global --add safe.directory "${WORKSPACE_DIRECTORY}"
pre-commit install

0 comments on commit 4b55c38

Please sign in to comment.