Module-Release-CSJEWELL
view release on metacpan or search on metacpan
script/release-csjewell.pl view on Meta::CPAN
H. Merijn Brand submitted patches to work with 5.005 and to create
the automated_testing feature.
=cut
use Getopt::Long;
use Module::Release '2.00_04';
my $class = "Module::Release";
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
my %opts;
my( $script_version ) = '2.00_05';
my $tag_vcs = 1;
$opts{k} = 1;
$opts{p} = 1;
GetOptions(
'usage' => sub { print "$0 version $script_version\n"; exit; },
'help' => \$opts{h},
'verbose' => \$opts{d},
'debug' => \$opts{d},
'kwalitee!' => \$opts{k},
'test' => \$opts{t},
'automate!' => \$opts{a},
'prereqs!' => \$opts{p},
'tag-vcs!' => \$tag_vcs,
) or $opts{h} = 1;
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
if( $opts{h} )
{
print <<"USE";
Use: $0 --options [ LOCAL_FILE [ REMOTE_FILE ] ]
Will upload current release LOCAL_FILE, naming it REMOTE_FILE. Will
get LOCAL_FILE and REMOTE_FILE automatically (using same name for
both) if not supplied.
--help This help
--verbose Print extra debugging information
--nokwalitee Skip kwalitee check
--test Just make and test distribution, don't tag/upload
--usage Print the script version number and exit
The program works in the current directory, and looks for a .releaserc
or releaserc file and the environment for its preferences. See
`perldoc $0`, for more information.
USE
exit;
}
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# get the release object
my %params;
$params{local} = shift @ARGV if @ARGV;
if( @ARGV )
{
$params{remote} = shift @ARGV;
}
elsif( $params{local} )
{
$params{remote} = $params{local};
}
$params{debug} = 1 if $opts{d};
my $release = $class->new( %params );
$release->_debug( "release $script_version, using $class "
. $class->VERSION . "\n" );
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# load whatever will handle source control
{
my @vcs = (
[ '.git' => "Module::Release::Git" ],
[ '.gitignore' => "Module::Release::Git" ],
[ '.svn' => "Module::Release::SVN" ],
[ 'CVS' => "Module::Release::CVS" ],
);
foreach my $vcs ( @vcs )
{
next unless -e $vcs->[0];
my $module = $vcs->[1];
if ($tag_vcs) {
$release->_debug( "I see an $vcs->[0] directory, so I'm loading $module\n" );
$release->load_mixin( $module );
die "Could not load $module: $@\n" if $@;
}
last;
}
}
if( $release->config->interactive ) # not a dry run
{
local $ENV{'PERL_MM_USE_DEFAULT'} = 1;
}
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Will we upload to PAUSE?
if( $release->config->cpan_user ) # not a dry run
{
$release->load_mixin( 'Module::Release::PAUSE' );
}
( run in 1.200 second using v1.01-cache-2.11-cpan-d8267643d1d )