Commit 5f4f2a4d authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

Build.PL: Get version from git. Still need to get it into the .pl file, tho

parent 404dff93
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@ use strict;
use warnings;
use Module::Build;

my $build = Module::Build->new(
my %opts = (
	build_requires => {
		'Test::More' => 0,
		'Test::Compile' => 0,
@@ -21,4 +21,11 @@ my $build = Module::Build->new(
		'WWW::Mechanize' => 0,
	},
);

if (-d '.git' and qx{which git} =~ qr{/git$}) {
	$opts{'dist_version'} = qx{git describe};
	chomp $opts{'dist_version'};
}

my $build = Module::Build->new(%opts);
$build->create_build_script;