Whamcloud - gitweb
b=22281 refactor packaging and versioning
[fs/lustre-release.git] / lustre / scripts / version_tag-none.pl
1 my ($tag, $version, $buildid, $pristine);
2
3 sub get_tag()
4 {
5
6     return $tag;
7
8 }
9
10 sub get_buildid()
11 {
12
13     return $buildid;
14
15 }
16
17 sub is_pristine()
18 {
19
20     return $pristine;
21
22 }
23
24 my $META = new IO::File;
25 if (!$META->open("META")) {
26     die "unable to open the META file: $!\n";
27 }
28 my $line;
29 while (defined($line = <$META>)) {
30     if ($line =~ /^TAG\s*=\s*(.+)/) {
31         $tag = $1;
32     } elsif ($line =~ /^VERSION\s*=\s*([\d\.])/) {
33         $version = $1;
34     } elsif ($line =~ /^BUILDID\s*=\s*([a-g\d]+)/) {
35         $buildid = $1;
36     } elsif  ($line =~ /^PRISTINE\s*=\s*([01])/) {
37         $pristine = $1;
38     }
39 }
40
41 1;