--- /dev/null
+#!/usr/bin/env perl
+use strict;
+use warnings FATAL => 'all';
+use ExtUtils::MakeMaker ();
+
+my $version = shift
+ or die "version required!";
+
+my $bad = join '',
+ map {
+ my $file_version = MM->parse_version($_);
+ ($file_version eq 'undef' || $file_version eq $version) ? ''
+ : "Module $_ version $file_version doesn't match dist version $version!\n";
+ } @ARGV;
+
+die $bad if $bad;
use Config;
use File::Spec;
use File::Find;
-use ExtUtils::MakeMaker ();
use Getopt::Long qw(:config gnu_getopt);
GetOptions(
die "Tag v$version already exists!";
}
-File::Find::find({ no_chdir => 1, wanted => sub {
- return
- unless -f && /\.pm$/;
- my $file_version = MM->parse_version($_);
- die "Module $_ version $file_version doesn't match dist version $version"
- unless $file_version eq 'undef' || $file_version eq $version;
-}}, 'lib');
-
for (scalar `"$make" manifest 2>&1 >$null`) {
$_ && die "$make manifest changed:\n$_ Go check it and retry";
}
my $targets = $self->SUPER::special_targets(@_);
my $phony_targets = join ' ', qw(
preflight
+ check-version
releasetest
release
readmefile
(map "$_ = $vars{$_}\n", sort keys %vars),
<<'END',
-preflight:
+preflight: check-version
$(ABSPERLRUN) Distar/helpers/preflight $(VERSION) --changelog=$(CHANGELOG) --branch=$(BRANCH)
+check-version:
+ $(ABSPERLRUN) Distar/helpers/check-version $(VERSION) $(TO_INST_PM) $(EXE_FILES)
releasetest:
$(MAKE) disttest RELEASE_TESTING=1 PASTHRU="$(PASTHRU) TEST_FILES=\"$(TEST_FILES)\""
release: preflight releasetest