Acme-Alien-DontPanic2
view release on metacpan or search on metacpan
maint/release view on Meta::CPAN
#!/usr/bin/env perl
use strict;
use warnings;
use Path::Tiny qw( path );
use Alien::Build ();
{
my @lines = path('dist.ini')->lines;
for(@lines)
{
if(/^version\s*=\s*(.*)\s*$/)
{
my $old = $1;
my $new = Alien::Build->VERSION . '00';
s/$old/$new/;
print " version $old -> $new\n";
if($old eq $new)
{
die "seems to be the same version";
}
}
elsif(/^Alien::Build\s*=\s*(.*)\s*$/)
{
my $old = $1;
my $new = Alien::Build->VERSION;
print " ab $old -> $new\n";
s/$old/$new/;
}
}
path('dist.ini')->spew(@lines);
}
{
my @lines = path('Changes')->lines;
my $title = shift @lines;
my $blank = shift @lines;
my $next = shift @lines;
unshift @lines, $title, $blank, $next,
" - Require Alien::Build @{[ Alien::Build->VERSION ]}\n";
path('Changes')->spew(@lines);
}
system 'git', 'diff';
print "does that look right? ";
my $input = <STDIN>;
die 'not right apparently' unless $input =~ /^y/i;
sub run
{
print "+@_\n";
system @_;
die if $?;
}
run 'dzil', 'release';
run 'cpanm', "Acme-Alien-DontPanic2-@{[ Alien::Build->VERSION . '00' ]}.tar.gz";
( run in 1.448 second using v1.01-cache-2.11-cpan-cdf2f3d4e48 )