release-notes: clarify help text and minor refactor
This commit is contained in:
parent
80d8b419de
commit
6d0899f298
@ -18,7 +18,7 @@ module Homebrew
|
||||
If no <previous_tag> is provided it defaults to the latest tag.
|
||||
If no <end_ref> is provided it defaults to `origin/master`.
|
||||
|
||||
If `--markdown` and a <previous_tag> are passed, an extra line containg
|
||||
If `--markdown` and a <previous_tag> are passed, an extra line containing
|
||||
a link to the Homebrew blog will be adding to the output. Additionally,
|
||||
a warning will be shown if the latest minor release was less than one month ago.
|
||||
EOS
|
||||
@ -35,11 +35,12 @@ module Homebrew
|
||||
previous_tag = args.named.first
|
||||
|
||||
if previous_tag.present?
|
||||
|
||||
most_recent_major_minor_tag = previous_tag.sub(/\d+$/, "0")
|
||||
one_month_ago = Date.today << 1
|
||||
previous_tag_date = Date.parse Utils.popen_read(
|
||||
"git", "-C", HOMEBREW_REPOSITORY, "log", "-1", "--format=%aI", previous_tag.sub(/\d+$/, "0")
|
||||
"git", "-C", HOMEBREW_REPOSITORY, "log", "-1", "--format=%aI", most_recent_major_minor_tag
|
||||
)
|
||||
opoo "The latest major/minor release was less than one month ago." if previous_tag_date > (Date.today << 1)
|
||||
opoo "The latest major/minor release was less than one month ago." if previous_tag_date > one_month_ago
|
||||
end
|
||||
|
||||
previous_tag ||= Utils.popen_read(
|
||||
|
||||
@ -1197,7 +1197,7 @@ Print the merged pull requests on Homebrew/brew between two Git refs.
|
||||
If no *`previous_tag`* is provided it defaults to the latest tag.
|
||||
If no *`end_ref`* is provided it defaults to `origin/master`.
|
||||
|
||||
If `--markdown` and a *`previous_tag`* are passed, an extra line containg
|
||||
If `--markdown` and a *`previous_tag`* are passed, an extra line containing
|
||||
a link to the Homebrew blog will be adding to the output. Additionally,
|
||||
a warning will be shown if the latest minor release was less than one month ago.
|
||||
|
||||
|
||||
@ -1673,7 +1673,7 @@ Use \fBstackprof\fR instead of \fBruby\-prof\fR (the default)\.
|
||||
Print the merged pull requests on Homebrew/brew between two Git refs\. If no \fIprevious_tag\fR is provided it defaults to the latest tag\. If no \fIend_ref\fR is provided it defaults to \fBorigin/master\fR\.
|
||||
.
|
||||
.P
|
||||
If \fB\-\-markdown\fR and a \fIprevious_tag\fR are passed, an extra line containg a link to the Homebrew blog will be adding to the output\. Additionally, a warning will be shown if the latest minor release was less than one month ago\.
|
||||
If \fB\-\-markdown\fR and a \fIprevious_tag\fR are passed, an extra line containing a link to the Homebrew blog will be adding to the output\. Additionally, a warning will be shown if the latest minor release was less than one month ago\.
|
||||
.
|
||||
.TP
|
||||
\fB\-\-markdown\fR
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user