Created
September 1, 2022 00:49
-
-
Save s1037989/28cbeb31813c88eb5b4edaa8c1dc3cb0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ perl -Mojo -E ' | |
c(1,2,3) | |
->tap(sub{@$_ = ( | |
{properties => {release => ["QQ_2022.08.1_rc1"], commit => [1]}}, | |
{properties => {release => ["QQ_2022.08.1"]}}, | |
{properties => {release => ["QQ_2022.07.1"]}} | |
)}) | |
->map(sub{[ | |
((grep { /^QQ_2022.08.1(_rc\d+)?$/ } @{$_->{properties}->{release}})[0]||undef), | |
((grep { $_ eq "1" } @{$_->{properties}->{commit}})[0]||undef) | |
]}) | |
->grep(sub{ | |
$_->[0] && $_->[0] =~ /^QQ_2022.08.1(_rc\d+)?$/ | |
}) | |
->sort(sub{ | |
$a->[0] cmp $b->[0] | |
}) | |
#->tap(sub{}) | |
->each(sub{say j($_)}) | |
' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment