Skip to content

Commit

Permalink
Update version_suffix
Browse files Browse the repository at this point in the history
  • Loading branch information
tudoramariei committed Feb 1, 2024
1 parent bc39a6b commit 134bd74
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions backend/redirectioneaza/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,15 +125,17 @@
VERSION = env.str("VERSION", "edge")
REVISION = env.str("REVISION", "develop")

VERSION_SUFFIX = f"redirect@{VERSION}+{REVISION}"


if IS_CONTAINERIZED and VERSION == "edge" and REVISION == "develop":
version_file = "/var/www/redirect/.version"
if os.path.exists(version_file):
with open(version_file) as f:
VERSION, REVISION = f.read().strip().split("+")

REVISION = REVISION[:7]

VERSION_SUFFIX = f"redirect@{VERSION}+{REVISION}"


# Sentry
if env.str("SENTRY_DSN"):
sentry_sdk.init(
Expand Down

0 comments on commit 134bd74

Please sign in to comment.