mirror of
git://scm.dxcluster.org/scm/spider
synced 2024-09-21 07:47:10 +00:00
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.
This commit is contained in:
parent
b9dffeff72
commit
8313e2686a
0
perl/.gitignore
vendored
Normal file
0
perl/.gitignore
vendored
Normal file
@ -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;
|
||||
|
41
perl/issue.pl
Executable file
41
perl/issue.pl
Executable file
@ -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;
|
||||
);
|
Loading…
Reference in New Issue
Block a user