diff options
author | Tatsuhiko Miyagawa <miyagawa@bulknews.net> | 2015-05-08 16:16:45 -0700 |
---|---|---|
committer | Tatsuhiko Miyagawa <miyagawa@bulknews.net> | 2015-05-08 16:17:24 -0700 |
commit | 206fe9c32db17c1d9bb8f86c3b00971e20237918 (patch) | |
tree | 92bc1cc90100f702f890ff6abe6a4ea9c216b6e3 /lib | |
parent | 579f2a52c7ea9dc3161884679382d408e9ff0b35 (diff) | |
download | carton-206fe9c32db17c1d9bb8f86c3b00971e20237918.tar.gz |
move carton fatpack into its own command.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Carton/CLI.pm | 19 | ||||
-rw-r--r-- | lib/Carton/Doc/Bundle.pod | 11 | ||||
-rw-r--r-- | lib/Carton/Doc/Fatpack.pod | 15 |
3 files changed, 25 insertions, 20 deletions
diff --git a/lib/Carton/CLI.pm b/lib/Carton/CLI.pm index a419518..b990ad2 100644 --- a/lib/Carton/CLI.pm +++ b/lib/Carton/CLI.pm @@ -145,12 +145,6 @@ sub cmd_version { sub cmd_bundle { my($self, @args) = @_; - my $fatpack = 1; - $self->parse_options( - \@args, - "fatpack!" => \$fatpack, - ); - my $env = Carton::Environment->build; $env->snapshot->load; @@ -162,14 +156,17 @@ sub cmd_bundle { ); $builder->bundle($env->install_path, $env->vendor_cache, $env->snapshot); - if ($fatpack) { - require Carton::Packer; - Carton::Packer->new->fatpack_carton($env->vendor_bin); - } - $self->printf("Complete! Modules were bundled into %s\n", $env->vendor_cache, SUCCESS); } +sub cmd_fatpack { + my($self, @args) = @_; + + my $env = Carton::Environment->build; + require Carton::Packer; + Carton::Packer->new->fatpack_carton($env->vendor_bin); +} + sub cmd_install { my($self, @args) = @_; diff --git a/lib/Carton/Doc/Bundle.pod b/lib/Carton/Doc/Bundle.pod index 834338f..68ce8cc 100644 --- a/lib/Carton/Doc/Bundle.pod +++ b/lib/Carton/Doc/Bundle.pod @@ -16,12 +16,5 @@ Bundled modules can be committed to a version control system, or transferred to another host with scp/rsync etc. to use with C<carton install --cached>. -=head1 OPTIONS - -=over 4 - -=item --no-fatpack - -Skip generating fatpacked C<carton> executable in C<vendor/bin>. - -=back +See also C<carton fatpack> that generates C<carton> executable in +C<vendor/bin>. diff --git a/lib/Carton/Doc/Fatpack.pod b/lib/Carton/Doc/Fatpack.pod new file mode 100644 index 0000000..15282e0 --- /dev/null +++ b/lib/Carton/Doc/Fatpack.pod @@ -0,0 +1,15 @@ +=head1 NAME + +Carton::Doc::Fatpack - Fatpack carton executable into vendor/bin + +=head1 SYNOPSIS + + carton fatpack + +=head1 DESCRIPTION + +This command creates a fatpack executable of C<carton> in +C<vendor/bin> directory, so that it can be used to bootstrap +deployment process, combined with C<carton bundle> and C<carton +install --cached>. + |