-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.sh
More file actions
executable file
·39 lines (35 loc) · 865 Bytes
/
init.sh
File metadata and controls
executable file
·39 lines (35 loc) · 865 Bytes
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
32
33
34
35
36
37
38
39
#!/usr/bin/env bash
# create .git folder
if [[ ! -d .git ]]; then
git init
fi
# install the python version specified in .python-version, if not already installed
if pyenv --version; then
pyenv install --skip-existing
fi
{ [[ -d .venv ]] || {
echo 'creating virtualenv...'
python -m venv .venv
}; } && {
# shellcheck disable=SC1091
. .venv/bin/activate
} && {
# install poetry if not already installed
poetry --version || brew install poetry
} && {
# install keyring
poetry self add keyrings-google-artifactregistry-auth@1.1.2
} && {
# update lock file
poetry lock
} && {
# install dependencies
poetry sync --no-root
}
{
# install pre-commit if not already installed
pre-commit --version || brew install pre-commit
} && {
# install pre-commit hooks
pre-commit install --install-hooks -t pre-commit -t pre-push -t commit-msg
}