From 6fd34cede65a3e58c8a144ea954b3831c93247b3 Mon Sep 17 00:00:00 2001 From: David Taylor Date: Wed, 8 Mar 2017 11:05:11 +0000 Subject: [PATCH] FIX: latest-version tag is shown by git-describe Adds the -match "v[0-9]*" parameter to git describe, this means that only version tags will be used. --- lib/discourse_updates.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/discourse_updates.rb b/lib/discourse_updates.rb index 61df22e2aa3..3e2f14c6823 100644 --- a/lib/discourse_updates.rb +++ b/lib/discourse_updates.rb @@ -7,7 +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`, + installed_describe: `git describe --dirty --match "v[0-9]*"`, git_branch: Discourse.git_branch, updated_at: nil ) @@ -17,7 +17,7 @@ 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`, + installed_describe: `git describe --dirty --match "v[0-9]*"`, missing_versions_count: missing_versions_count, git_branch: Discourse.git_branch, updated_at: updated_at