feat(nexxa): 1.6.0 — /version informa el commit desplegado (P335/F15)
Tests ADN / test (push) Canceled after 0s

organismo/COMMIT lo genera gemma nexxa desplegar al desplegar (nunca en el repo, .gitignore).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Co-Authored-By: GEMMA <noreply@gemma.dtic>
This commit is contained in:
Ricardo Monla
2026-10-04 18:59:45 -03:00
co-authored by Claude Opus 5.5 GEMMA
parent 63ea8a0abb
commit 351ad40220
3 changed files with 6 additions and 2 deletions
+4 -1
View File
@@ -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|