App-git-ship
view release on metacpan or search on metacpan
lib/App/git/ship.pm view on Meta::CPAN
$self->config('project_name') =~ s!::!-!gr;
$repository =~ s!^[^:]+:!https://github.com/! unless $repository =~ /^http/;
warn "[ship::repository] $repository\n" if DEBUG;
return $repository;
}
sub _get_template {
my ($self, $name) = @_;
my $class = ref $self;
my $str;
no strict 'refs';
for my $package ($class, @{"$class\::ISA"}) {
$str = Mojo::Loader::data_section($package, $name) or next;
$name = "$package/$name";
last;
}
return $str ? Mojo::Template->new->name($name)->vars(1)->parse($str) : undef;
}
1;
=encoding utf8
=head1 NAME
App::git::ship - Git command for shipping your project
=head1 VERSION
0.37
=head1 SYNOPSIS
See L<App::git::ship::perl/SYNOPSIS> for how to build Perl projects.
Below is a list of useful git aliases:
# git build
$ git config --global alias.build 'ship build'
# git cl
$ git config --global alias.cl 'ship clean'
# git start
# git start My/Project.pm
$ git config --global alias.start 'ship start'
=head1 DESCRIPTION
L<App::git::ship> is a L<git|http://git-scm.com/> command for building and
shipping your project.
The main focus is to automate away the boring steps, but at the same time not
get in your (or any random contributor's) way. Problems should be solved with
sane defaults according to standard rules instead of enforcing more rules.
L<App::git::ship> differs from other tools like L<dzil|Dist::Zilla> by I<NOT>
requiring any configuration except for a file containing the credentials for
uploading to CPAN.
=head2 Supported project types
Currently, only L<App::git::ship::perl> is supported.
=head1 ENVIRONMENT VARIABLES
Environment variables can also be set in a config file named C<.ship.conf>, in
the root of the project directory. The format is:
# some comment
bugtracker = whatever
new_version_format = %v %Y-%m-%dT%H:%M:%S%z
Any of the keys are the lower case version of L</ENVIRONMENT VARIABLES>, but
without the "GIT_SHIP_" prefix.
Note however that all environment variables are optional, and in many cases
L<App::git::ship> will simply do the right thing, without any configuration.
=head2 GIT_SHIP_AFTER_SHIP
It is possible to add hooks. These hooks are
programs that runs in your shell. Example hooks:
GIT_SHIP_AFTER_SHIP="bash script/new-release.sh"
GIT_SHIP_AFTER_BUILD="rm -r lib/My/App/templates lib/My/App/public"
GIT_SHIP_AFTER_SHIP="cat Changes | mail -s "Changes for My::App" all@my-app.com"
=head2 GIT_SHIP_AFTER_BUILD
See L</GIT_SHIP_AFTER_SHIP>.
=head2 GIT_SHIP_BEFORE_BUILD
See L</GIT_SHIP_AFTER_SHIP>.
=head2 GIT_SHIP_BEFORE_SHIP
See L</GIT_SHIP_AFTER_SHIP>.
=head2 GIT_SHIP_BUGTRACKER
URL to the bugtracker for this project.
=head2 GIT_SHIP_CLASS
This class is used to build the object that runs all the actions on your
project. This is autodetected by looking at the structure and files in
your project. For now this value can be L<App::git::ship> or
L<App::git::ship::perl>, but any customization is allowed.
=head2 GIT_SHIP_CONTRIBUTORS
Comma-separated list with C<< name <email> >> of the contributors to this project.
=head2 GIT_SHIP_DEBUG
Setting this variable will make "git ship" output more information.
( run in 1.756 second using v1.01-cache-2.11-cpan-cdf2f3d4e48 )