Skip to content

Commit 50ea4fe

Browse files
author
Dominick N
committed
ci: provide default env for openapi generation in CI
1 parent 7acae3e commit 50ea4fe

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

scripts/generate-client.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ set -e
44
set -x
55

66
cd backend
7+
# Provide safe defaults for CI where ../.env may be missing
8+
export PROJECT_NAME=${PROJECT_NAME:-"full-stack-fastapi-template"}
9+
export POSTGRES_SERVER=${POSTGRES_SERVER:-"localhost"}
10+
export POSTGRES_USER=${POSTGRES_USER:-"postgres"}
11+
export POSTGRES_DB=${POSTGRES_DB:-"app"}
12+
export FIRST_SUPERUSER=${FIRST_SUPERUSER:-"admin@example.com"}
13+
export FIRST_SUPERUSER_PASSWORD=${FIRST_SUPERUSER_PASSWORD:-"changethis"}
14+
715
uv run python -c "import app.main; import json; print(json.dumps(app.main.app.openapi()))" > ../openapi.json
816
cd ..
917
mv openapi.json frontend/

0 commit comments

Comments
 (0)