From a4f0c4360d985663b3262fd5f3e9b664a6608607 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 10 Jun 2018 06:10:20 +0000 Subject: [PATCH] Just use current date. git-svn-id: http://svn.redmine.org/redmine/trunk@17376 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- bin/changelog.rb | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/bin/changelog.rb b/bin/changelog.rb index 553e8e060..7862f21eb 100644 --- a/bin/changelog.rb +++ b/bin/changelog.rb @@ -1,6 +1,7 @@ #!/usr/bin/env ruby require 'optparse' require 'ostruct' +require 'date' VERSION = '1.0.0' @@ -216,18 +217,7 @@ module Redmine end def release_date - @r_date.empty? ? (@release_date || parse_release_date) : @r_date - end - - def parse_release_date - version_details = retrieve_version_details - release_date = version_details.css(RELEASE_DATE_SELECTOR).first.text - - unless release_date =~ RELEASE_DATE_REGEX_COMPLETE - release_date = release_date.match(RELEASE_DATE_REGEX_INCOMPLETE) - release_date = release_date[1] - end - @release_date = release_date + @r_date.empty? ? (@release_date || Date.today.strftime("%Y-%m-%d")) : @r_date end def retrieve_version_details -- 2.39.5