Git-ReleaseRepo

 view release on metacpan or  search on metacpan

lib/Git/ReleaseRepo/Command/update.pm  view on Meta::CPAN

    for my $mod ( @$args ) {
        $self->update_submodule( $mod, $branch );
    }
    my $message = @$args == 1
                ? "Updating $args->[0]"
                : "Updating all outdated:\n"
                    . join "\n", map { sprintf "\t\%s", $_ } sort @$args;
    $git->run( commit => ( @$args ), -m => $message );
};

sub update_submodule {
    my ( $self, $module, $branch ) = @_;
    $branch ||= "master";
    my $git = $self->git;
    if ( !$git->submodule->{ $module } ) {
        die "Cannot add $module: Submodule does not exist\n";
    }
    my $subgit = $git->submodule_git( $module );
    my $cmd = $subgit->command( 'fetch' );
    $cmd->close;
    $cmd = $subgit->command( checkout => $branch );

lib/Git/ReleaseRepo/CreateCommand.pm  view on Meta::CPAN

use Moose;
extends 'Git::ReleaseRepo::Command';
use File::Spec::Functions qw( catfile );
use YAML qw( LoadFile DumpFile );

override usage_desc => sub {
    my ( $self ) = @_;
    return super() . " <repo_url> [<repo_name>]";
};

sub update_config {
    my ( $self, $opt, $repo, $extra ) = @_;
    $extra ||= {};
    my $config_file = catfile( $repo->git_dir, 'release' );
    my $config = -f $config_file ? LoadFile( $config_file ) : {};

    for my $conf ( qw( version_prefix ) ) {
        if ( exists $opt->{$conf} ) {
            $config->{$conf} = $opt->{$conf};
        }
    }

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 1.136 second using v1.00-cache-2.02-grep-82fe00e-cpan-4673cadbf75 )