App-Puppet-Environment-Updater

 view release on metacpan or  search on metacpan

lib/App/Puppet/Environment/Updater.pm  view on Meta::CPAN

	is            => 'ro',
	isa           => 'Str',
	required      => 1,
	documentation => 'Environment/branch which should be merged',
);

has 'environment' => (
	is            => 'ro',
	isa           => 'Str',
	required      => 1,
	documentation => 'Environment/branch which should be updated',
);

has 'remote' => (
	is            => 'ro',
	isa           => 'Str',
	documentation => 'Git remote to fetch latest changes from, defaults to "origin"',
	default       => 'origin',
);

has 'workdir' => (
	is            => 'ro',
	isa           => 'Path::Class::Dir',
	coerce        => 1,
	documentation => 'Directory to work in, should be the directory with the environment that should be updated',
	default       => sub {
		return Path::Class::Dir->new('.')->absolute();
	},
);

has 'git' => (
	is      => 'ro',
	isa     => 'Git::Wrapper',
	traits  => ['NoGetopt'],
	lazy    => 1,

lib/App/Puppet/Environment/Updater.pm  view on Meta::CPAN

}



sub update_submodules {
	my ($self) = @_;

	my $workdir = pushd($self->get_workdir());
	my $logger = $self->get_proxy_logger(YELLOW.'[update-submodules] '.RESET);
	$logger->log('Updating submodules...');
	if (my @updated = $self->get_git()->submodule('update', '--init')) {
		$logger->log($_) for @updated;
	}
	else {
		$logger->log('No submodules to update.');
	}

	return;
}

__PACKAGE__->meta()->make_immutable();

lib/App/Puppet/Environment/Updater.pm  view on Meta::CPAN

merge.

=head3 Parameters

This method expects positional parameters.

=over

=item branch

The name of the branch which should be updated.

=back

=head3 Result

Nothing on success, an exception otherwise.

=head2 merge

Merge a given branch into another branch.



( run in 0.271 second using v1.01-cache-2.11-cpan-05444aca049 )