From 33cd5c218f9f67496a6ee05c8c532af9b07c6506 Mon Sep 17 00:00:00 2001 From: Jiri Uhlir Date: Wed, 20 May 2026 10:57:56 +0200 Subject: [PATCH] Add Python app generator --- scripts/new-python-app.sh | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/scripts/new-python-app.sh b/scripts/new-python-app.sh index 861c1d8..3cbf627 100755 --- a/scripts/new-python-app.sh +++ b/scripts/new-python-app.sh @@ -43,7 +43,7 @@ rm -rf .git sed -i "s/Python FastAPI Template/$APP_NAME/g" app/main.py -cat > app.yml < app.yml < README.md < README.md < /tmp/appfactory-create-repo-response.json -if echo "$CREATE_REPO_RESPONSE" | grep -q '"message".*"already exists"'; then - echo "Repository already exists in Gitea." +if grep -q '"message"' /tmp/appfactory-create-repo-response.json; then + cat /tmp/appfactory-create-repo-response.json fi git init @@ -99,14 +99,8 @@ git push -u origin main echo "" echo "DONE" -echo "" echo "Repository:" echo "$GITEA_URL/$GITEA_ORG/$APP_ID" echo "" echo "Local path:" echo "$TARGET_DIR" -echo "" -echo "Test:" -echo "cd $TARGET_DIR" -echo "docker build -t $APP_ID ." -echo "docker run --rm -p 8001:8000 $APP_ID"