diff --git a/dockerfiles/python-3.10.Dockerfile b/dockerfiles/python-3.10.Dockerfile new file mode 100644 index 0000000..93ff98c --- /dev/null +++ b/dockerfiles/python-3.10.Dockerfile @@ -0,0 +1,5 @@ +FROM python:3.10-alpine + +RUN pip install "py-luke==0.0.2" + +ENTRYPOINT ["luke"] diff --git a/dockerfiles/Dockerfile b/dockerfiles/python-3.11.Dockerfile similarity index 58% rename from dockerfiles/Dockerfile rename to dockerfiles/python-3.11.Dockerfile index 41e1994..5148813 100644 --- a/dockerfiles/Dockerfile +++ b/dockerfiles/python-3.11.Dockerfile @@ -1,5 +1,5 @@ FROM python:3.11-alpine -RUN pip install py-luke +RUN pip install "py-luke==0.0.2" ENTRYPOINT ["luke"] diff --git a/dockerfiles/python-3.7.Dockerfile b/dockerfiles/python-3.7.Dockerfile new file mode 100644 index 0000000..e71bcba --- /dev/null +++ b/dockerfiles/python-3.7.Dockerfile @@ -0,0 +1,5 @@ +FROM python:3.7-alpine + +RUN pip install "py-luke==0.0.2" + +ENTRYPOINT ["luke"] diff --git a/dockerfiles/python-3.8.Dockerfile b/dockerfiles/python-3.8.Dockerfile new file mode 100644 index 0000000..e9b5fa9 --- /dev/null +++ b/dockerfiles/python-3.8.Dockerfile @@ -0,0 +1,5 @@ +FROM python:3.8-alpine + +RUN pip install "py-luke==0.0.2" + +ENTRYPOINT ["luke"] diff --git a/dockerfiles/python-3.9.Dockerfile b/dockerfiles/python-3.9.Dockerfile new file mode 100644 index 0000000..abaf030 --- /dev/null +++ b/dockerfiles/python-3.9.Dockerfile @@ -0,0 +1,5 @@ +FROM python:3.9-alpine + +RUN pip install "py-luke==0.0.2" + +ENTRYPOINT ["luke"] diff --git a/luke/__init__.py b/luke/__init__.py index 3a95571..7319aed 100644 --- a/luke/__init__.py +++ b/luke/__init__.py @@ -1,5 +1,5 @@ -from .generators import ObjectFieldGenerator # type: ignore # noqa -from .server import ServerGenerator # type: ignore # noqa -from .openapi import OpenAPISpec # type: ignore # noqa +from .generators import ObjectFieldGenerator # type: ignore # noqa +from .server import ServerGenerator # type: ignore # noqa +from .openapi import OpenAPISpec # type: ignore # noqa -__version__ = '0.0.1' +__version__ = "0.0.2" diff --git a/luke/main.py b/luke/main.py index e063d46..56b5edb 100644 --- a/luke/main.py +++ b/luke/main.py @@ -28,7 +28,7 @@ def start_server( spec.load(file) generator = ServerGenerator() server = generator.make_server(spec) - uvicorn.run(server, log_level=log_level) + uvicorn.run(server, log_level=log_level, host=host, port=port) @cli.command("validate") diff --git a/scripts/sync-version b/scripts/sync-version new file mode 100755 index 0000000..ea867ff --- /dev/null +++ b/scripts/sync-version @@ -0,0 +1,13 @@ +#!/bin/sh + +NEW_VERSION=$1 + +for file in $(ls dockerfiles); do + sed -i "" "s/\"\(py-luke\)==\(.*\)\"/\"\1==$NEW_VERSION\"/" "dockerfiles/$file" +done + +echo "Update version $NEW_VERSION for dockerfiles" + + +sed -i "" "s/\(__version__\) = \(.*\)/\1 = \"$NEW_VERSION\"/" "luke/__init__.py" +echo "Updated version $NEW_VERSION for luke/__init__.py"