Skip to content

Commit

Permalink
feat: allow reading version from environment
Browse files Browse the repository at this point in the history
Temporary (hopefully) workaround for NixOS.
A better fix will require more invasive refactoring.
  • Loading branch information
K900 committed Aug 22, 2023
1 parent 29dbf2d commit 7147da5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions backend/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ def mkdir_as_user(path):

# Fetches the version of loader
def get_loader_version() -> str:
# FIXME: this should really come from package metadata
env_version = os.getenv('DECKY_VERSION')
if env_version:
return env_version

try:
with open(os.path.join(os.getcwd(), ".loader.version"), "r", encoding="utf-8") as version_file:
return version_file.readline().strip()
Expand Down

0 comments on commit 7147da5

Please sign in to comment.