NAME

Peace::Model::Release - The release object representation.

SYNOPSIS

my $release = Peace::Model::Release->new(
  application => $application,
  tag         => $tag,
  name        => $name,
);

DESCRIPTION

Describes a release from an application from Peace.

INSTANCE METHODS

Peace::Model::Release implements the following instance methods:

new

my $release = Peace::Model::Release->new(
  uuid             => $uuid,             # optional
  date_creation    => $date_creation,    # optional
  application      => $application,      # required or application_uuid should be passed.
  application_uuid => $application_uuid, # required or application should be passed
  dbh              => $dbh,              # needed if application_uuid is passed
  tag              => $tag,
  name             => $name,
);

METHODS

Peace::Model::Release implements the following methods:

generate_build

my $result = $release->generate_build( arch => $arch );

my ($success, $output) = @result{'success', 'output'};

Generates a build for a given arch of the release and returns the success status, any false value failed, any true value succeded and the output which combines stdout and stderr from the ran commands and some application specific data about whats being done.

The output log is thought to be human consumed, not automatically parsed.

uuid

my $uuid = $release->uuid;

$release->uuid($uuid);

Allows to retrieve and set the release uuid.

date_creation

my $date_creation = $release->date_creation;

$release->date_creation($date_creation);

Allows to retrieve and set the release date creation as a DateTime.

application

my $application = $release->application;

$release->application($application);

Allows to retrieve and set the release application as a Peace::Model::Application.

tag

my $tag = $release->tag;

$release->tag($tag);

Allows to retrieve and set the release tag.

name

my $name = $release->name

$release->name($name);

Allows to retrieve and set the release name.

SEE ALSO

Peace::Model::Application, Peace::DAO::Release