diff options
author | Daniel Friesel <derf@finalrewind.org> | 2010-12-12 17:41:50 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2010-12-12 17:41:50 +0100 |
commit | 5f4f2a4d54e4f0e2aabedd9ab1b5483c503204e6 (patch) | |
tree | 029e530000eca81d32bb2c215fc80429762d588d | |
parent | 404dff939c881a403f7bd7a7c4827cdc476a477a (diff) |
Build.PL: Get version from git. Still need to get it into the .pl file, tho
-rw-r--r-- | Build.PL | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -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; |