fix version for python < 3.11
All checks were successful
Lint Checks / Run linter (pull_request) Successful in 33s
Webapp Test / Run webapp test suite (pull_request) Successful in 4m32s
Smoke Test / Run basic test suite (pull_request) Successful in 4m23s
Deploy Test / Run deploy test suite (pull_request) Successful in 5m19s
K8s Deploy Test / Run deploy test suite on kind/k8s (pull_request) Successful in 7m50s

This commit is contained in:
Roy Crihfield 2024-06-25 00:25:04 +08:00
parent c861cf1e9b
commit 1579700571

View File

@ -24,9 +24,9 @@ def command(ctx):
# See: https://stackoverflow.com/a/20885799/1701505
from stack_orchestrator import data
tag_file_path = resources.files(data) / "build_tag.txt"
if tag_file_path.exists():
with open(tag_file_path, "r") as version_file:
# tag_file_path = resources.files(data) /
if resources.is_resource(data, "build_tag.txt"):
with resources.open_text(data, "build_tag.txt") as version_file:
# TODO: code better version that skips comment lines
version_string = version_file.read().splitlines()[1]
else: