summaryrefslogtreecommitdiff
path: root/task/release.rake
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-08-09 19:38:04 +0200
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-08-12 18:51:19 +0200
commita9b79d6b4ab7f050b77873d395cd108c819fe360 (patch)
tree37c6bb1690b19093e80e4c456699a04f3ff0be9a /task/release.rake
parent01166221e5660e11d8e416bd866b7942816008a3 (diff)
downloadbundler-a9b79d6b4ab7f050b77873d395cd108c819fe360.tar.gz
Exclude PRs to the previous to last stable branch
Diffstat (limited to 'task/release.rake')
-rw-r--r--task/release.rake9
1 files changed, 5 insertions, 4 deletions
diff --git a/task/release.rake b/task/release.rake
index f484b4722d..0d3cc72a5d 100644
--- a/task/release.rake
+++ b/task/release.rake
@@ -218,17 +218,18 @@ namespace :release do
commits.reverse_each.map {|c| c =~ /(Auto merge of|Merge pull request|Merge) #(\d+)/ && $2 }.compact
end
- def release_tags
- `git ls-remote origin`.split("\n").map {|r| r =~ %r{refs/tags/v([\d.]+)$} && $1 }.compact.map {|v| Gem::Version.create(v) }
+ def minor_release_tags
+ `git ls-remote origin`.split("\n").map {|r| r =~ %r{refs/tags/v([\d.]+)$} && $1 }.compact.map {|v| Gem::Version.create(Gem::Version.create(v).segments[0, 2].join(".")) }.sort.uniq
end
def to_stable_branch(release_tag)
release_tag.segments[0, 2].<<("stable").join("-")
end
- last_stable = to_stable_branch(release_tags.max)
+ last_stable = to_stable_branch(minor_release_tags[-1])
+ previous_to_last_stable = to_stable_branch(minor_release_tags[-2])
- in_release = prs("HEAD") - prs(last_stable)
+ in_release = prs("HEAD") - prs(last_stable) - prs(previous_to_last_stable)
print "About to review #{in_release.size} pending PRs. "