Skip to content

Commit

Permalink
Move version-detecting code earlier in Makefile.PL when stamping
Browse files Browse the repository at this point in the history
This fixed an issue with not properly stamping when generating via `perl Makefile.PL nocopy`

Reported-by: Josh Lavin <jlavin@endpoint.com>
  • Loading branch information
David Christensen committed Nov 17, 2017
1 parent c80fc85 commit b459d6e
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions Makefile.PL
Expand Up @@ -296,6 +296,13 @@ sub initialize {
$MV::Default{RPMBUILDDIR} = $X{RPMBUILDDIR};
}

# if we are building from a git checkout, then set the VERSION based on the
# closest git tag, otherwise use the last hard-coded version

$X{VERSION} = get_dist_version();
system(qq{echo '"$X{VERSION}"' > _ic_version});


return \%X if $MV::Default{nocopy};

my $uid = $MV::Default{INTERCHANGE_USER};
Expand Down Expand Up @@ -706,12 +713,6 @@ EOF
# Check for extra needed libraries
extra_libs($realdir);

# if we are building from a git checkout, then set the VERSION based on the
# closest git tag, otherwise use the last hard-coded version

$X{VERSION} = get_dist_version();
system(qq{echo '"$X{VERSION}"' > _ic_version});

mk_initp(\%X);
delete $X{RPMBUILDDIR};
return \%X;
Expand Down

0 comments on commit b459d6e

Please sign in to comment.