Skip to content

Commit 09c46d5

Browse files
committed
Build some of the dangling branches
The title of this commit does not express how cool this is.
1 parent c63ed89 commit 09c46d5

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

build.p6

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ my \DIR-BASE = PROJECT.lc;
3232
my \PARALLEL-COUNT = 1;
3333
my \COMMIT-RANGE = 2015.07^..HEAD;
3434
my \TAGS-SINCE = 2014-01-01;
35+
my \ALL-SINCE = 2017-01-01; # catch branches that are flapping in the breeze
3536

3637
my \WORKING-DIRECTORY = .; # TODO not supported yet
3738

@@ -73,15 +74,19 @@ if REPO-CURRENT.IO !~~ :d {
7374

7475
my $channel = Channel.new;
7576

76-
my @git-latest = git, --git-dir, {REPO-LATEST}/.git, --work-tree, REPO-LATEST;
77+
my @git-latest = git, --git-dir, {REPO-LATEST}/.git, --work-tree, REPO-LATEST;
7778
my @args-tags = |@git-latest, log, -z, --pretty=%H, --tags, --no-walk, --since, TAGS-SINCE;
7879
my @args-latest = |@git-latest, log, -z, --pretty=%H, COMMIT-RANGE;
79-
80-
#$channel.send: $_ for run(:out, |@args-tags ).out.split(0.chr, :skip-empty);
81-
# ↑ TODO this ends with Nil or an empty string for some reason? It makes
82-
# this check: 「last unless $commit」 exit from the loop, so it never reaches
83-
# actual commits.
84-
$channel.send: $_ for run(:out, |@args-latest).out.split(0.chr, :skip-empty);
80+
my @args-recent = |@git-latest, log, -z, --pretty=%H, --all, --since, ALL-SINCE;
81+
82+
my %commits;
83+
for @args-tags, @args-latest, @args-recent -> @_ {
84+
for run(:out, |@_).out.split(0.chr, :skip-empty) {
85+
next if %commits{$_}:exists;
86+
%commits{$_}++;
87+
$channel.send: $_
88+
}
89+
}
8590

8691
await (for ^PARALLEL-COUNT { # TODO rewrite when .race starts working in rakudo
8792
start loop {

0 commit comments

Comments
 (0)