Subversion Repositories gelsvn

Rev

Rev 68 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
68 bj 1
package Version;
2
 
3
# ************************************************************
4
# Description   : Central location for the MPC version.
5
# Author        : Chad Elliott
6
# Create Date   : 1/5/2003
7
# ************************************************************
8
 
9
# ************************************************************
10
# Pragmas
11
# ************************************************************
12
 
13
use strict;
14
 
15
# ************************************************************
16
# Data Section
17
# ************************************************************
18
 
19
## This is the starting major and minor version
71 bj 20
my($version) = '3.3';
68 bj 21
my($once)    = 1;
22
 
23
# ************************************************************
24
# Subroutine Section
25
# ************************************************************
26
 
27
sub get {
28
  if ($once) {
29
    ## We only need to do this once
30
    $once = 0;
31
 
32
    ## Here we determine the beta version.  The base variable
33
    ## is the negated number of existing ChangeLog entries at the
34
    ## time of the release of the major and minor version.  We then
35
    ## add the total number of ChangeLog entries to the base to
36
    ## get the beta version.
37
    my($base) = -1;
38
    if (open(CLH, ::getBasePath() . '/ChangeLog')) {
39
      while(<CLH>) {
40
        if (/^\w\w\w\s\w\w\w\s/) {
41
          ++$base;
42
        }
43
      }
44
      close(CLH);
45
 
46
      ## We then append the beta version number to the version string
47
      $version .= ".$base";
48
    }
49
    else {
50
      $version .= '.??';
51
    }
52
  }
53
 
54
  return $version;
55
}
56
 
57
 
58
1;