From 9396c66d11488374669fa2c0ec65a81b0354ce61 Mon Sep 17 00:00:00 2001 From: Celestino Rey Date: Fri, 11 Apr 2025 15:16:09 +0200 Subject: [PATCH] =?UTF-8?q?Versi=C3=B3n=20como=20variable=20de=20entorno?= =?UTF-8?q?=20en=20settings?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- JugarAlPadel/K8S/Makefile | 3 ++- JugarAlPadel/K8S/jugaralpadel-deployment.yaml | 4 ++-- JugarAlPadel/gestion_reservas/gestion_reservas/settings.py | 3 +-- JugarAlPadel/gestion_reservas/templates/_branding.html | 3 ++- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/JugarAlPadel/K8S/Makefile b/JugarAlPadel/K8S/Makefile index 9c885ee..e6fea13 100644 --- a/JugarAlPadel/K8S/Makefile +++ b/JugarAlPadel/K8S/Makefile @@ -1,8 +1,9 @@ export ARQUITECTURA := $(shell lscpu |grep itectur | tr -d ' '| cut -f2 -d':') export REGISTRY=registry.reymota.es -export IMG_VERSION = 0.70.44 +export IMG_VERSION = 0.70.46 export IMG_NGINX_VERSION = 2.3 +export APP_VERSION = 12.0 # limpia todo all: imagen clean install diff --git a/JugarAlPadel/K8S/jugaralpadel-deployment.yaml b/JugarAlPadel/K8S/jugaralpadel-deployment.yaml index 473425c..2e60e7f 100644 --- a/JugarAlPadel/K8S/jugaralpadel-deployment.yaml +++ b/JugarAlPadel/K8S/jugaralpadel-deployment.yaml @@ -39,8 +39,8 @@ spec: name: jugaralpadel image: $REGISTRY/jugaralpadel-$ARQUITECTURA:$IMG_VERSION env: - - name: VERSION - value: "$IMG_VERSION" + - name: APP_VERSION + value: "$APP_VERSION" - name: DEBUG valueFrom: configMapKeyRef: diff --git a/JugarAlPadel/gestion_reservas/gestion_reservas/settings.py b/JugarAlPadel/gestion_reservas/gestion_reservas/settings.py index ebda0df..c1b4b57 100644 --- a/JugarAlPadel/gestion_reservas/gestion_reservas/settings.py +++ b/JugarAlPadel/gestion_reservas/gestion_reservas/settings.py @@ -14,8 +14,7 @@ from pathlib import Path import os import logging - -APP_VERSION = "11.0.2" +APP_VERSION = os.environ.get("APP_VERSION", "0.0.0-dev") # Valor por defecto si no está definido # Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR = Path(__file__).resolve().parent.parent diff --git a/JugarAlPadel/gestion_reservas/templates/_branding.html b/JugarAlPadel/gestion_reservas/templates/_branding.html index 8e17661..839e01e 100644 --- a/JugarAlPadel/gestion_reservas/templates/_branding.html +++ b/JugarAlPadel/gestion_reservas/templates/_branding.html @@ -3,6 +3,7 @@ {% load filtros_de_entorno %}
- + + Versión: {{ APP_VERSION }}