Skip to content

Commit

Permalink
track release number of containers
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianschroeter committed Nov 24, 2017
1 parent 1cc350c commit 7d9131a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Build/Kiwi.pm
Expand Up @@ -392,6 +392,8 @@ sub showcontainerinfo {
my $d = parse({}, $fn);
die("$d->{'error'}\n") if $d->{'error'};
$image =~ s/.*\/// if defined $image;
my $release;
$release = $1 if $image =~ /.*-Build(\d+\.\d+).*/;
my @tags = map {"\"$_\""} @{$d->{'container_tags'} || []};
my @repos;
for my $repo (@{$d->{'imagerepos'} || []}) {
Expand All @@ -404,6 +406,7 @@ sub showcontainerinfo {
print "{\n";
print " \"name\": \"$d->{'name'}\"";
print ",\n \"version\": \"$d->{'version'}\"" if defined $d->{'version'};
print ",\n \"release\": \"$release\"" if defined $release;
print ",\n \"tags\": [ ".join(', ', @tags)." ]" if @tags;
print ",\n \"repos\": [ ".join(', ', @repos)." ]" if @repos;
print ",\n \"file\": \"$image\"" if defined $image;
Expand Down

0 comments on commit 7d9131a

Please sign in to comment.