Skip to content

Commit

Permalink
Merge pull request #29 from wtsi-npg/devel
Browse files Browse the repository at this point in the history
prepare for release 0.5.6
  • Loading branch information
mgcam authored Sep 8, 2017
2 parents 7438733 + ef24ae1 commit 5c3fe85
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
3 changes: 3 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
Release 0.5.6
- Module::Build custom builder - use internal report_version to avoid caching
issues with dist_version.

Release 0.5.5
- Loggable role extended to optionally redirect standard error output to a log/logs it handles.
Expand Down
3 changes: 3 additions & 0 deletions MANIFEST
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.travis.yml
Build.PL
Changes
COPYING
etc/log4perl_tests.conf
lib/WTSI/DNAP/Utilities.pm
Expand All @@ -16,6 +17,8 @@ lib/WTSI/DNAP/Utilities/Loggable/Redirected.pm
lib/WTSI/DNAP/Utilities/Runnable.pm
lib/WTSI/DNAP/Utilities/Startable.pm
MANIFEST This list of files
META.json
META.yml
README
t/bin/test_log_config.pl
t/bin/true.sh
Expand Down
12 changes: 6 additions & 6 deletions lib/WTSI/DNAP/Utilities/Build.pm
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ sub report_version {
die "Failed to open $DIST_VERSION_FILE for reading: $!\n";
$version = <$fh>;
chomp $version;
close $fh or carp "Failed to clode $DIST_VERSION_FILE cleanly\n";
close $fh or carp "Failed to close $DIST_VERSION_FILE cleanly\n";
}
else {
$version = $self->git_tag;
Expand Down Expand Up @@ -128,7 +128,7 @@ sub ACTION_dist {
print "Creating dist version file $version_file\n";
open my $fh, '>', $version_file or
die "Failed to open $version_file for writing: $!\n";
print $fh $self->dist_version, "\n";
print $fh $self->report_version, "\n";
close $fh or carp "Failed to close $version_file cleanly\n";

# If this is a repository, set the dist version from git
Expand All @@ -147,9 +147,10 @@ sub _set_version {
my ($self, @dirs) = @_;
@dirs = grep { -d } @dirs;

my $version = $self->report_version;
if (@dirs) {
warn "Changing version of all modules and scripts to '" .
$self->dist_version . "'\n";
$version . "'\n";

find({'follow' => 0,
'no_chdir' => 1,
Expand All @@ -162,7 +163,7 @@ sub _set_version {
local @ARGV = ($module);

while (my $line = <>) {
$self->_transform($line);
$self->_transform($version, $line);
}

unlink "$module$backup";
Expand All @@ -175,8 +176,7 @@ sub _set_version {
}

sub _transform {
my ($self, $line) = @_;
my $version = $self->dist_version;
my ($self, $version, $line) = @_;

##no critic (RequireExtendedFormatting RequireLineBoundaryMatching)
##no critic (RequireDotMatchAnything ProhibitUnusedCapture)
Expand Down

0 comments on commit 5c3fe85

Please sign in to comment.