diff options
| author | Eugene Triguba <hello@eugenetriguba.com> | 2025-08-13 22:15:53 -0400 |
|---|---|---|
| committer | Eugene Triguba <hello@eugenetriguba.com> | 2025-08-13 22:15:53 -0400 |
| commit | 177fa85c68ebbc9690f3c3b4417948242ee97c29 (patch) | |
| tree | 659d50c3c0500a88b5de1142c46df3b39481e2c5 /scripts | |
| parent | Fix image syntax (diff) | |
| download | config-file-177fa85c68ebbc9690f3c3b4417948242ee97c29.zip | |
Adjust build script
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/run-tests.sh | 32 | ||||
| -rwxr-xr-x | scripts/setup-uv.sh | 6 |
2 files changed, 38 insertions, 0 deletions
diff --git a/scripts/run-tests.sh b/scripts/run-tests.sh new file mode 100755 index 0000000..4dbe4d3 --- /dev/null +++ b/scripts/run-tests.sh @@ -0,0 +1,32 @@ +#!/bin/sh +set -ex + +PYTHON_VERSION="" + +main() { + while [ $# -gt 0 ]; do + case "$1" in + --python-version) + shift + PYTHON_VERSION="$1" + ;; + *) + echo "Unknown argument: $1" + exit 1 + ;; + esac + shift + done + + if [ -z "$PYTHON_VERSION" ]; then + echo "Error: --python-version must be provided" + exit 1 + fi + + uv python install "$PYTHON_VERSION" + uv use "$PYTHON_VERSION" + uv sync --all-extras + uv run task test +} + +main "$@" diff --git a/scripts/setup-uv.sh b/scripts/setup-uv.sh new file mode 100755 index 0000000..f8e4031 --- /dev/null +++ b/scripts/setup-uv.sh @@ -0,0 +1,6 @@ +#!/bin/sh +set -ex +python3 -m pip install --user pipx +python3 -m pipx ensurepath +pipx install uv +export PATH="$HOME/.local/bin:$PATH" |