diff --git a/.version b/.version new file mode 100644 index 0000000..8a9ecc2 --- /dev/null +++ b/.version @@ -0,0 +1 @@ +0.0.1 \ No newline at end of file diff --git a/app.py b/app.py index e40d69f..0a538c7 100644 --- a/app.py +++ b/app.py @@ -11,7 +11,10 @@ class Item(BaseModel): @app.get('/', response_model=List[Item]) def get_items(): - data_info = [Item(module_name="Crypto Licensing", module_version="1.0.0")] + with open('.version') as f: + module_version = f.read().strip() + + data_info = [Item(module_name="Crypto Licensing", module_version=module_version)] return data_info # @app.get('/items/{item_id}', response_model=Optional[Item])