From 8313e2686aa5384c6a9fd0e56e913db7a68f10bb Mon Sep 17 00:00:00 2001 From: Dirk Koopman Date: Thu, 14 Jun 2007 14:56:05 +0100 Subject: [PATCH] use no of commits as the build no on a tag use the no of commits from git-describe as the build no relative to the the version no tag. --- perl/.gitignore | 0 perl/Version.pm | 9 +++++++-- perl/issue.pl | 41 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 perl/.gitignore create mode 100755 perl/issue.pl diff --git a/perl/.gitignore b/perl/.gitignore new file mode 100644 index 00000000..e69de29b diff --git a/perl/Version.pm b/perl/Version.pm index 6e0c1a35..9fe21c15 100644 --- a/perl/Version.pm +++ b/perl/Version.pm @@ -1,10 +1,15 @@ # +# 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 = "1.53"; -$build = 466; +$version = '1.53'; +$build = '4-gb9dffef'; 1; 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; +); -- 2.43.0