-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup
32 lines (28 loc) · 894 Bytes
/
setup
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
#!/usr/bin/env bash
#
#------------------------------------------------------------------------------
# Conductor - orchestrate your scripts' execution
# Copyright (C) 2023 Jacob Kochems
# SPDX-License-Identifier: GPL-3.0-or-later
#------------------------------------------------------------------------------
PRJNAME="conductor"
setup_venv () {
mv README.rst README.md 2> /dev/null || true
poetry add --group=dev pytest@latest &&
poetry update &&
poetry install &&
# if ! grep -q "tool.poetry.scripts" pyproject.toml; then
# echo "\n[tool.poetry.scripts]" >> pyproject.toml
# echo "$PRJNAME = \"${PRJNAME}.main:cli\"" >> pyproject.toml
# fi
}
setup_clean () {
rm -rf -- dist ./"$PRJNAME"/__pycache__ tests/__pycache__
}
setup_purge () {
VENV=$(poetry env list --full-path | cut -d ' ' -f 1) &&
if [ $VENV ]; then
rm -rf -- "$VENV" &&
rm -f -- poetry.*
fi
}