From 351ad4022003d62352b046a670c8cb5168b0a221 Mon Sep 17 00:00:00 2001 From: Ricardo Monla Date: Sun, 4 Oct 2026 18:59:45 -0300 Subject: [PATCH] =?UTF-8?q?feat(nexxa):=201.6.0=20=E2=80=94=20/version=20i?= =?UTF-8?q?nforma=20el=20commit=20desplegado=20(P335/F15)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit organismo/COMMIT lo genera gemma nexxa desplegar al desplegar (nunca en el repo, .gitignore). Co-Authored-By: Claude Opus 5.5 Co-Authored-By: GEMMA --- servicios/nexxa/.gitignore | 1 + servicios/nexxa/organismo/VERSION | 2 +- servicios/nexxa/organismo/server.rb | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/servicios/nexxa/.gitignore b/servicios/nexxa/.gitignore index f318dc9e..88725321 100644 --- a/servicios/nexxa/.gitignore +++ b/servicios/nexxa/.gitignore @@ -10,3 +10,4 @@ organismo/checkins.json organismo/pools.json organismo/*.log *.bak* +organismo/COMMIT diff --git a/servicios/nexxa/organismo/VERSION b/servicios/nexxa/organismo/VERSION index bc80560f..dc1e644a 100644 --- a/servicios/nexxa/organismo/VERSION +++ b/servicios/nexxa/organismo/VERSION @@ -1 +1 @@ -1.5.0 +1.6.0 diff --git a/servicios/nexxa/organismo/server.rb b/servicios/nexxa/organismo/server.rb index 94e3edf7..7131955e 100644 --- a/servicios/nexxa/organismo/server.rb +++ b/servicios/nexxa/organismo/server.rb @@ -48,6 +48,7 @@ SESSION_COOKIE = 'nexxa_session' # bump sin reiniciar igual — justo el caso más común. Costo despreciable # (un archivo de una línea) frente a que el número mienta. VERSION_FILE = File.expand_path('VERSION', __dir__).freeze +COMMIT_FILE = File.expand_path('COMMIT', __dir__).freeze def version_actual File.read(VERSION_FILE).strip end @@ -206,7 +207,9 @@ end server.mount_proc '/version' do |req, res| res.status = 200 res.content_type = 'application/json' - res.body = { version: version_actual }.to_json + # commit: el que dejó `gemma nexxa desplegar` (organismo/COMMIT, generado al desplegar, nunca en el repo — P335/F15) + commit = File.exist?(COMMIT_FILE) ? File.read(COMMIT_FILE).strip : nil + res.body = { version: version_actual, commit: commit }.to_json end server.mount_proc '/session' do |req, res|