mirror of
https://github.com/rickbarrette/simple-aircraft-manager-rails.git
synced 2026-11-17 23:50:36 -05:00
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:
1 parent
98e943cf0a
commit
8c8e3b7374
16 files changed
+110
-19
No files matched your search
@@ -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) ||
|
||||
|
||||
Reference in new issue
Block a user