2022-08-09 06:06:32 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2023-05-12 07:13:48 +00:00
|
|
|
# Avoiding Dubious Ownership in Dev Containers for setup commands that use git
|
|
|
|
# Note that the local workspace directory is passed through as the first argument $1
|
|
|
|
git config --global --add safe.directory $1
|
|
|
|
|
2022-08-09 06:06:32 +00:00
|
|
|
# create folders
|
2023-05-12 07:13:48 +00:00
|
|
|
mkdir -p $1/dev/{commandhistory,plugins}
|
|
|
|
cd $1
|
2022-08-09 06:06:32 +00:00
|
|
|
|
|
|
|
# create venv
|
2023-12-04 20:05:48 +00:00
|
|
|
python3 -m venv $1/dev/venv
|
|
|
|
. $1/dev/venv/bin/activate
|
2022-08-09 06:06:32 +00:00
|
|
|
|
2023-01-24 22:29:50 +00:00
|
|
|
# setup InvenTree server
|
2022-08-09 06:06:32 +00:00
|
|
|
pip install invoke
|
2023-12-04 20:05:48 +00:00
|
|
|
invoke update
|
2023-05-12 07:13:48 +00:00
|
|
|
invoke setup-dev
|
2023-07-18 12:45:49 +00:00
|
|
|
invoke frontend-install
|
2023-05-05 12:34:42 +00:00
|
|
|
|
|
|
|
# remove existing gitconfig created by "Avoiding Dubious Ownership" step
|
2023-05-12 07:13:48 +00:00
|
|
|
# so that it gets copied from host to the container to have your global
|
2023-05-05 12:34:42 +00:00
|
|
|
# git config in container
|
|
|
|
rm -f /home/vscode/.gitconfig
|