Ignore:
Timestamp:
Sep 3, 2007, 8:33:06 PM (12 years ago)
Author:
bruno
Message:

Last removal of VERSION TAG files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/lib/ProjectBuilder/Base.pm

    r93 r98  
    111111
    112112#
    113 # Get global VERSION
    114 #
    115 open(VER, "$ENV{'PBCONF'}/VERSION") || die "Unable to open $ENV{'PBCONF'}/VERSION: $?";
    116 $ver = <VER>;
    117 chomp($ver);
    118 #print Dumper(%version);
    119 die "Invalid version name $ver in $ENV{'PBROOT'}/VERSION" if ($ver !~ /[0-9.]+/) && (not exists $version{$ver});
    120 $ENV{'PBVER'}=$ver;
    121 close(VER);
    122 
    123 #
    124 # Get global TAG
    125 #
    126 open(TAG, "$ENV{'PBCONF'}/TAG") || die "Unable to open $ENV{'PBCONF'}/TAG: $?";
    127 $tag = <TAG>;
    128 chomp($tag);
    129 die "Invalid tag name $tag in $ENV{'PBROOT'}/TAG" if ($tag !~ /[0-9]+/);
    130 $ENV{'PBTAG'}=$tag;
    131 close(TAG);
     113# Get global Version/Tag
     114#
     115my ($pkgv, $pkgt) = pb_conf_read("$ENV{'PBCONF'}/$proj.pb","projver","projtag");
     116
     117if (not defined $ENV{'PBVER'}) {
     118    if ((defined $pkgv) && (defined $pkgv->{$proj})) {
     119        $ENV{'PBVER'}=$pkgv->{$proj};
     120    } else {
     121        die "No projver found in $ENV{'PBCONF'}/$proj.pb";
     122    }
     123}
     124die "Invalid version name $ENV{'PBVER'} in $ENV{'PBCONF'}/$proj.pb" if (($ENV{'PBVER'} !~ /[0-9.]+/) && (not exists $version{$ENV{'PBVER'}}));
     125
     126if (not defined $ENV{'PBTAG'}) {
     127    if ((defined $pkgt) && (defined $pkgt->{$proj})) {
     128        $ENV{'PBTAG'}=$pkgt->{$proj};
     129    } else {
     130        die "No projtag found in $ENV{'PBCONF'}/$proj.pb";
     131    }
     132}
     133die "Invalid tag name $ENV{'PBTAG'} in $ENV{'PBCONF'}/$proj.pb" if ($ENV{'PBTAG'} !~ /[0-9.]+/);
    132134
    133135#
Note: See TracChangeset for help on using the changeset viewer.