Versions: year.month.release (VERSION) plus build (commit); What's new from CHANGELOG.md

Shown on Admin -> About, in the software history, records package, procedures
and sam:doctor; release notes in the app under Help.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rickyandClaude Opus 5.5 committed 2026-11-11 21:03:31 -05:00
1 parent 98e943cf0a
commit 8c8e3b7374
16 files changed
+110 -19

No files matched your search

+1
View File
@@ -10,6 +10,7 @@ class AppRevision < ApplicationRecord
record = find_or_initialize_by(revision: revision)
record.first_seen_at ||= now
record.built_at ||= SystemInfo.new.built_at
record.version ||= SystemInfo.new.version
record.last_seen_at = now
record.save!
rescue ActiveRecord::ActiveRecordError => e
+2 -2
View File
@@ -3,7 +3,7 @@
class HelpGuide
DIR = Rails.root.join("docs/guide")
ORDER = %w[README getting-started profile aircraft flights squawks oil-and-fuel components logbook records
inspections ads documents major-records sharing administration].freeze
inspections ads documents major-records sharing administration changelog].freeze
OPTIONS = {
parse: { smart: true },
render: { hardbreaks: false, unsafe: false },
@@ -18,7 +18,7 @@ class HelpGuide
def self.find(slug)
return unless ORDER.include?(slug.to_s)
path = DIR.join("#{slug}.md")
path = slug.to_s == "changelog" ? Rails.root.join("CHANGELOG.md") : DIR.join("#{slug}.md")
return unless path.file?
markdown = path.read
Page.new(slug: slug.to_s, title: markdown[/\A# (.+)$/, 1] || slug.to_s.titleize, markdown: markdown)
+10 -1
View File
@@ -12,7 +12,16 @@ class SystemInfo
DATABASES = { "Main" => :primary, "Cache" => :cache, "Jobs" => :queue, "Cable" => :cable }.freeze
# Set by the Docker build (see Dockerfile); in development, read from git.
# The release version, YYYY.MM.N (the repository's VERSION file).
def version
@version ||= Rails.root.join("VERSION").then { _1.exist? ? _1.read.strip.presence : nil } || "unreleased"
end
# "2026.11.0 (build 87e3094)"
def version_label = "#{version} (build #{revision})"
# The build: the commit it was made from. Set by the Docker build (see
# Dockerfile); in development, read from git.
def revision
@revision ||= ENV["APP_REVISION"].presence ||
(Rails.root.join(".git").exist? && `git -C #{Rails.root} rev-parse --short HEAD 2>/dev/null`.strip.presence) ||