-
Notifications
You must be signed in to change notification settings - Fork 9
/
Pakku.rakumod
48 lines (34 loc) · 992 Bytes
/
Pakku.rakumod
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
unit class Blin::Tester::Pakku;
has $.path;
has $.binary;
has $.output-failed;
has @.sources;
submethod TWEAK ( ) {
note ‘🥞 Installing Pakku ’;
my $pakku-src = ‘data/pakku-src’.IO;
if $pakku-src.d {
run :cwd($pakku-src), <git pull>
} else {
run <git clone https://github.com/hythm7/Pakku.git>, $pakku-src
}
#| Where to install pakku
my $pakku-path = ‘data/pakku’.IO;
run "$pakku-src/tools/install-pakku.raku", "--dest=$pakku-path";
# using recman meta source here
# can be replaced with zef sources
@!sources = <http://recman.pakku.org/meta/42>;
$!path = $pakku-path;
$!binary = $!path.add: 'bin/pakku';
$!output-failed = '💀';
}
method test-command( ::?CLASS:D: :$testable!, :$install-path!, :$module-name! ) {
$!binary,
"verbose info",
"yolo",
"add",
"force",
( $testable ?? "test" !! "notest" ),
"nodeps",
"to $install-path",
$module-name,
}