Changeset 2450 in ProjectBuilder


Ignore:
Timestamp:
Sep 7, 2019, 2:23:37 AM (5 years ago)
Author:
Bruno Cornec
Message:

Improve newver

  • Fix #140 where one extra line was generated in the pbcl
  • Improve testver hanfling in YAML
File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r2443 r2450  
    36523652        if (/^projver\s+$ENV{'PBPROJ'}\s*=\s*$oldvertxt$/) {
    36533653            s/^projver\s+$ENV{'PBPROJ'}\s*=\s*$oldvertxt$/projver $ENV{'PBPROJ'} = $newvertxt/;
     3654            pb_log(0,"Changing projver from $oldvertxt to $newvertxt in $ENV{'PBCONFDIR'}/$newver/$ENV{'PBPROJ'}.pb\n");
     3655        }
     3656        if (/^projver:\n\s+$ENV{'PBPROJ'}:\s*$oldvertxt$/) {
     3657            s/^projver:\n\s+$ENV{'PBPROJ'}:\s*$oldvertxt$/projver:\n  $ENV{'PBPROJ'}: $newvertxt/;
    36543658            pb_log(0,"Changing projver from $oldvertxt to $newvertxt in $ENV{'PBCONFDIR'}/$newver/$ENV{'PBPROJ'}.yml\n");
    36553659        }
    36563660        if (/^testver/) {
    3657             s/^testver/#testver/;
    3658             pb_log(0,"Commenting testver in $ENV{'PBCONFDIR'}/$newver/$ENV{'PBPROJ'}.yml\n") if (/^testver/);
     3661            s/^testver:\n\s+$ENV{'PBPROJ'}:(.*)$/#testver:\n#\s+$ENV{'PBPROJ'}: $1/;
     3662            pb_log(0,"Commenting testver in $ENV{'PBCONFDIR'}/$newver/$ENV{'PBPROJ'}.yml\n");
     3663            my $txt = $_;
     3664            chomp($txt);
    36593665        }
    36603666        if (/^delivery/) {
     
    36943700                pb_log(0,"WARNING: version $newvertxt not found in $f so added to $f2...\n") if ($foundnew == 0);
    36953701            }
    3696             if ($cnt <= 4) {
     3702            if ($cnt <= 3) {
    36973703                print OUT "$_" if (not /^$oldvertxt \(/);
    36983704            } else {
Note: See TracChangeset for help on using the changeset viewer.