@@ -30,6 +30,7 @@ use Text::Diff::Sift4;
30
30
use Misc;
31
31
32
32
constant RAKUDO = ‘ ./rakudo’ . IO . absolute;
33
+ constant MOARVM = ‘ ./moarvm’ . IO . absolute;
33
34
constant CONFIG = ‘ ./config.json’ . IO . absolute;
34
35
constant SOURCE = ‘ https://github.com/perl6/whateverable’ ;
35
36
constant WIKI = ‘ https://github.com/perl6/whateverable/wiki/’ ;
@@ -125,10 +126,10 @@ method build-exists($full-commit-hash, :$backend=‘rakudo-moar’) {
125
126
“ { ARCHIVES-LOCATION} /$ backend /$ full-commit-hash .zst” . IO ~~ : e
126
127
}
127
128
128
- method get-similar ($ tag-or-hash , @ other ? ) {
129
+ method get-similar ($ tag-or-hash , @ other ? , : $ repo = RAKUDO ) {
129
130
my $ old-dir = $ * CWD ;
130
131
LEAVE chdir $ old-dir ;
131
- chdir RAKUDO ;
132
+ chdir $ repo ;
132
133
133
134
my @ options = @ other ;
134
135
my @ tags = self . get-output(‘ git’ , ‘ tag’ , ‘ --format=%(*objectname)/%(objectname)/%(refname:strip=2)’ ,
@@ -194,15 +195,15 @@ method run-snippet($full-commit-hash, $file, :$backend=‘rakudo-moar’, :$time
194
195
}
195
196
}
196
197
197
- method get-commits ($ config ) {
198
+ method get-commits ($ config , : $ repo = RAKUDO ) {
198
199
my $ old-dir = $ * CWD ;
199
200
LEAVE chdir $ old-dir ;
200
201
my @ commits ;
201
202
202
203
if $ config . contains : ‘ ,’ {
203
204
@ commits = $ config . split : ‘ ,’ ;
204
205
} elsif $ config ~~ /^ $ < start > =\S + ‘..’ $ < end > =\S + $ / {
205
- chdir RAKUDO ; # goes back in LEAVE
206
+ chdir $ repo ; # goes back in LEAVE
206
207
if run (: out(Nil ), ‘ git’ , ‘ rev-parse’ , ‘ --verify’ , $ < start > ). exitcode ≠ 0 {
207
208
return “ Bad start, cannot find a commit for “$<start>”” ;
208
209
}
@@ -215,9 +216,9 @@ method get-commits($config) {
215
216
my $ num-commits = @ commits . elems ;
216
217
return “ Too many commits ($ num-commits ) in range, you're only allowed { COMMITS-LIMIT} ” if $ num-commits > COMMITS-LIMIT
217
218
} elsif $ config ~~ /:i ^ [ releases | v? 6 \.? c ] $ / {
218
- @ commits = self . get-tags: ‘ 2015-12-24’
219
+ @ commits = self . get-tags: ‘ 2015-12-24’ , repo => $ repo
219
220
} elsif $ config ~~ /:i ^ all $ / {
220
- @ commits = self . get-tags: ‘ 2014-01-01’
221
+ @ commits = self . get-tags: ‘ 2014-01-01’ , repo => $ repo
221
222
} elsif $ config ~~ /:i ^ compare \s $ < commit > =\S + $ / {
222
223
@ commits = $ < commit >
223
224
} else {
@@ -227,9 +228,9 @@ method get-commits($config) {
227
228
return Nil , | @ commits # TODO throw exceptions instead of doing this
228
229
}
229
230
230
- method get-tags ($ date ) {
231
+ method get-tags ($ date , : $ repo = RAKUDO ) {
231
232
my $ old-dir = $ * CWD ;
232
- chdir RAKUDO ;
233
+ chdir $ repo ;
233
234
LEAVE chdir $ old-dir ;
234
235
235
236
my @ tags = <HEAD >;
@@ -245,9 +246,9 @@ method get-tags($date) {
245
246
@ tags . reverse
246
247
}
247
248
248
- method to-full-commit ($ commit , : $ short = False ) {
249
+ method to-full-commit ($ commit , : $ short = False , : $ repo = RAKUDO ) {
249
250
my $ old-dir = $ * CWD ;
250
- chdir RAKUDO ;
251
+ chdir $ repo ;
251
252
LEAVE chdir $ old-dir ;
252
253
253
254
return if run (: out(Nil ), ‘ git’ , ‘ rev-parse’ , ‘ --verify’ , $ commit ). exitcode ≠ 0 ; # make sure that $commit is valid
0 commit comments