Changeset 98


Ignore:
Timestamp:
Sep 3, 2007, 8:33:06 PM (13 years ago)
Author:
Bruno Cornec
Message:

Last removal of VERSION TAG files

Location:
devel
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r97 r98  
    123123    pb_cms_init($ENV{'PBPROJ'});
    124124
    125     my ($pkgv, $pkgt) = pb_conf_read("$ENV{'PBCONF'}/$ENV{'PBPROJ'}.pb","pkgversion","pkgtag");
     125    my ($pkgv, $pkgt) = pb_conf_read("$ENV{'PBCONF'}/$ENV{'PBPROJ'}.pb","pkgver","pkgtag");
    126126    foreach my $pbpkg (@pkgs) {
    127         if (defined $pkgv->$pbpkg) {
    128             $pbver = $pkgv->$pbpkg;
     127        if ((defined $pkgv) && (defined $pkgv->{$pbpkg})) {
     128            $pbver = $pkgv->{$pbpkg};
    129129        } else {
    130130            $pbver = $ENV{'PBVER'};
    131131        }
    132         if (defined $pkgt->$pbpkg) {
    133             $pbtag = $pkgt->$pbpkg;
     132        if ((defined $pkgt) && (defined $pkgt->{$pbpkg})) {
     133            $pbtag = $pkgt->{$pbpkg};
    134134        } else {
    135135            $pbtag = $ENV{'PBTAG'};
  • 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#
  • devel/pbconf/pb.pb

    r95 r98  
    55# $Id$
    66#
     7#
    78
    8 # Adapdt to your needs:
    9 # Optional if you need to overwrite the global values
    10 # from .pbrc
    11 #pkgversion project-builder = devel
     9#
     10# Global version/tag for the project
     11#
     12projver pb = devel
     13projtag pb = 1
     14
     15# Adapt to your needs:
     16# Optional if you need to overwrite the global values above
     17#
     18#pkgver project-builder = devel
    1219#pkgtag project-builder = 1
    1320
Note: See TracChangeset for help on using the changeset viewer.