X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?p=spider.git;a=blobdiff_plain;f=perl%2Fissue.pl;fp=perl%2Fissue.pl;h=6d2bfd34a9856fa1d8691659c464ded3ff919631;hp=0000000000000000000000000000000000000000;hb=8313e2686aa5384c6a9fd0e56e913db7a68f10bb;hpb=b9dffeff7239952814342dad19db3a51def6fab7 diff --git a/perl/issue.pl b/perl/issue.pl new file mode 100755 index 00000000..6d2bfd34 --- /dev/null +++ b/perl/issue.pl @@ -0,0 +1,41 @@ +#!/usr/bin/perl +# +# create a version and build id for the project using git ids +# +# $Id$ +# +# Copyright (c) 2007 Dirk Koopman, G1TLH +# + +# Determine the correct place to put stuff +BEGIN { + # root of directory tree for this system + $root = "/spider"; + $root = $ENV{'DXSPIDER_ROOT'} if $ENV{'DXSPIDER_ROOT'}; +} + +use strict; + +use vars qw($root); +my $fn = "$root/perl/Version.pm"; +my $desc = `git-describe`; +my ($v, $b) = $desc =~ /^([\d.]+)-(\d+)-/; +$b++; # to account for the commit that is about to happen + +open F, ">$fn" or die "issue.pl: can't open $fn $!\n"; +print F qq(# +# Version information for DXSpider +# +# DO NOT ALTER THIS FILE. It is generated automatically +# and will be overwritten +# + +package main; + +use vars qw(\$version \$build); + +\$version = '$v'; +\$build = '$b'; + +1; +);