diff --git a/app/assets/javascripts/admin/templates/version_checks.hbs b/app/assets/javascripts/admin/templates/version_checks.hbs
index fefee6fec5d..9148a4562d5 100644
--- a/app/assets/javascripts/admin/templates/version_checks.hbs
+++ b/app/assets/javascripts/admin/templates/version_checks.hbs
@@ -14,7 +14,7 @@
{{#unless loading}}
{{i18n 'admin.dashboard.version'}} |
- {{ versionCheck.installed_version }} |
+ {{ versionCheck.installed_describe }} |
{{#if versionCheck.noCheckPerformed}}
|
diff --git a/app/models/discourse_version_check.rb b/app/models/discourse_version_check.rb
index 1ac0da47f06..c1be79fcd95 100644
--- a/app/models/discourse_version_check.rb
+++ b/app/models/discourse_version_check.rb
@@ -1,5 +1,5 @@
class DiscourseVersionCheck
include ActiveModel::Model
- attr_accessor :latest_version, :critical_updates, :installed_version, :installed_sha, :missing_versions_count, :updated_at, :version_check_pending
-end
\ No newline at end of file
+ attr_accessor :latest_version, :critical_updates, :installed_version, :installed_sha, :installed_describe, :missing_versions_count, :updated_at, :version_check_pending
+end
diff --git a/lib/discourse_updates.rb b/lib/discourse_updates.rb
index c456ce80276..cb845714e12 100644
--- a/lib/discourse_updates.rb
+++ b/lib/discourse_updates.rb
@@ -7,6 +7,7 @@ module DiscourseUpdates
DiscourseVersionCheck.new(
installed_version: Discourse::VERSION::STRING,
installed_sha: (Discourse.git_version == 'unknown' ? nil : Discourse.git_version),
+ installed_describe: `git describe --dirty`,
updated_at: nil
)
else
@@ -15,11 +16,17 @@ module DiscourseUpdates
critical_updates: critical_updates_available?,
installed_version: Discourse::VERSION::STRING,
installed_sha: (Discourse.git_version == 'unknown' ? nil : Discourse.git_version),
+ installed_describe: `git describe --dirty`,
missing_versions_count: missing_versions_count,
updated_at: updated_at
)
end
+ # replace -commit_count with +commit_count
+ if version_info.installed_describe =~ /-(\d+)-/
+ version_info.installed_describe = version_info.installed_describe.gsub(/-(\d+)-.*/, " +#{$1}")
+ end
+
if SiteSetting.version_checks?
# Handle cases when version check data is old so we report something that makes sense
@@ -130,4 +137,4 @@ module DiscourseUpdates
'missing_version'
end
end
-end
\ No newline at end of file
+end