line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Alien::Build::Plugin::Probe::OverrideCI; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
278063
|
use strict; |
|
2
|
|
|
|
|
11
|
|
|
2
|
|
|
|
|
64
|
|
4
|
2
|
|
|
2
|
|
11
|
use warnings; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
53
|
|
5
|
2
|
|
|
2
|
|
468
|
use Alien::Build::Plugin; |
|
2
|
|
|
|
|
1126
|
|
|
2
|
|
|
|
|
14
|
|
6
|
2
|
|
|
2
|
|
201
|
use Path::Tiny qw( path ); |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
90
|
|
7
|
2
|
|
|
2
|
|
941
|
use File::chdir; |
|
2
|
|
|
|
|
6360
|
|
|
2
|
|
|
|
|
641
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
# ABSTRACT: Override logic for continuous integration |
10
|
|
|
|
|
|
|
our $VERSION = '0.03'; # VERSION |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub init |
14
|
|
|
|
|
|
|
{ |
15
|
12
|
|
|
12
|
1
|
167910
|
my($self, $meta) = @_; |
16
|
|
|
|
|
|
|
|
17
|
12
|
|
|
|
|
34
|
my $ci_build_root; |
18
|
|
|
|
|
|
|
|
19
|
12
|
100
|
66
|
|
|
178
|
if(defined $ENV{TRAVIS} && $ENV{TRAVIS} eq 'true' && defined $ENV{TRAVIS_BUILD_DIR}) |
|
|
100
|
66
|
|
|
|
|
|
|
50
|
66
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
20
|
|
|
|
|
|
|
{ |
21
|
4
|
|
|
|
|
16
|
$ci_build_root = path($ENV{TRAVIS_BUILD_DIR})->realpath; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
elsif(defined $ENV{APPVEYOR} && $ENV{APPVEYOR} eq 'True' && $ENV{APPVEYOR_BUILD_FOLDER}) |
24
|
|
|
|
|
|
|
{ |
25
|
4
|
|
|
|
|
18
|
$ci_build_root = path($ENV{APPVEYOR_BUILD_FOLDER})->realpath; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
elsif(defined $ENV{GITHUB_ACTIONS} && $ENV{GITHUB_ACTIONS} eq 'true' && $ENV{GITHUB_WORKSPACE}) |
28
|
|
|
|
|
|
|
{ |
29
|
4
|
|
|
|
|
16
|
$ci_build_root = path($ENV{GITHUB_WORKSPACE})->realpath; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
else |
32
|
|
|
|
|
|
|
{ |
33
|
|
|
|
|
|
|
# are you sure you are running under CI? |
34
|
0
|
|
|
|
|
0
|
die "unable to detect the type of CI"; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
my $override = |
38
|
|
|
|
|
|
|
$ci_build_root->subsumes(path($CWD)->realpath) |
39
|
|
|
|
|
|
|
? $ENV{ALIEN_INSTALL_TYPE_CI} || '' |
40
|
12
|
100
|
50
|
|
|
2925
|
: $ENV{ALIEN_INSTALL_TYPE} || ''; |
|
|
|
50
|
|
|
|
|
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
#Alien::Build->log("override = $override"); |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
$meta->register_hook( |
45
|
|
|
|
|
|
|
override => sub { |
46
|
12
|
|
|
12
|
|
47769
|
$override; |
47
|
|
|
|
|
|
|
}, |
48
|
12
|
|
|
|
|
4329
|
); |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
1; |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
__END__ |