Skip to content

Commit

Permalink
Versioning fix (#12)
Browse files Browse the repository at this point in the history
* release version as env variable

* versioning via file
  • Loading branch information
lAmeR1 authored Feb 8, 2023
1 parent 3df1444 commit c095f48
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion server.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,17 @@
sio = socketio.AsyncServer(async_mode="asgi", cors_allowed_origins=[])
socket_app = socketio.ASGIApp(sio)

try:
with open("VERSION", "r") as f:
release_version = f.read()
except FileNotFoundError:
release_version = "x.x.x"


app = FastAPI(
title="Kaspa REST-API server",
description="This server is to communicate with kaspa network via REST-API",
version="0.0.2",
version=release_version,
contact={
"name": "lAmeR1"
},
Expand Down

0 comments on commit c095f48

Please sign in to comment.