Skip to content

Commit

Permalink
add module_name method
Browse files Browse the repository at this point in the history
  • Loading branch information
mohawk2 committed Mar 26, 2024
1 parent 3793f58 commit c8836f3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions docker/lib/PDL/Devops/DB.pm
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,15 @@ lazy groups => sub {
return [ keys %{ $self->_item_by_group } ];
};

sub module_name {
my ($self, $item) = @_;
(my $module_name = $item->dist) =~ s/-/::/g;
$module_name;
}

sub apt_pkgs {
my ($self, $item) = @_;
my @apt = ();
push @apt, @{ $item->apt };
my @apt = @{ $item->apt };
for my $deps (@{ $item->depends }) {
push @apt, @{ $self->apt_pkgs(
$self->key_to_item->{ $deps }
Expand Down
2 changes: 1 addition & 1 deletion docker/lib/PDL/Devops/Process/Docker.pm
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ sub run {
my $item = $self->item;
my $db = $self->db;
my $tag = $item->docker_tag;
(my $module_name = $item->dist) =~ s/-/::/g;
my $module_name = $item->module_name;
my $apt_pkgs = join " ", @{ $db->apt_pkgs( $item ) };
my @cmd = (
qw(docker build),
Expand Down

0 comments on commit c8836f3

Please sign in to comment.