Files
trygo-py-cliclient/scripts/simple_create_user.sh
Deepak Mallubhotla 8be5b5f1c8
Some checks failed
Nix Tests / nix-test (nix-runner) (push) Failing after 3m35s
Python Tests / python-test (push) Failing after 52s
cli to view workouts
2025-11-01 23:38:19 -05:00

29 lines
872 B
Bash
Executable File

#!/usr/bin/env bash
set -Eeuo pipefail
banner() {
echo "========================================================"
echo " $*"
echo "========================================================"
}
# utility script for easy testing
banner "Checking if test user exists"
if uv run taiga login --email "test@example.com" --password "test" 2>/dev/null; then
echo "Test user already exists, skipping registration"
else
banner "Creating test user"
uv run taiga register --display-name "Display Test" --email "test@example.com" --password "test"
banner "Logging in test user"
uv run taiga login --email "test@example.com" --password "test"
fi
banner "Uploading test files"
uv run taiga workouts upload local/test-data/test.fit
uv run taiga workouts upload local/test-data/test2.fit
uv run taiga workouts upload local/test-data/test3.fit
banner "Setup complete!"