Skip to content

Commit

Permalink
versioning via file
Browse files Browse the repository at this point in the history
  • Loading branch information
lAmeR1 committed Feb 8, 2023
1 parent c13cafd commit 78e027a
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=os.getenv("RELEASE_VERSION", "x.x.x"),
version=release_version,
contact={
"name": "lAmeR1"
},
Expand Down

0 comments on commit 78e027a

Please sign in to comment.