From 7e66ea007c4caad26c935287bd414b4b6c21c03a Mon Sep 17 00:00:00 2001 From: tonnesen Date: Mon, 28 Oct 2002 22:59:46 +0000 Subject: [PATCH] buildrelease now supports 1.2 and 1.3 branches automatically --- buildrelease | 31 +++++++++++++++++++++++++++++-- koha.upgrade | 3 +++ moredetail.pl | 2 +- 3 files changed, 33 insertions(+), 3 deletions(-) diff --git a/buildrelease b/buildrelease index 21960c6682..a45e1ac7b0 100644 --- a/buildrelease +++ b/buildrelease @@ -59,13 +59,14 @@ kohahtmldir=$kohahtmldir |; print "\n\nGuessing at next release version. You may need to enter your SourceForge password...\n"; -chdir $kohadir || die "$kohadir: $!\n"; open (CVSLOG, "cvs log buildrelease|"); my $symbolicnamessection=0; my $symbolicnames; my $highestversion; my $highestrc; my $released; +my $majorversion; +my $majorversionrc; while () { if (/^symbolic names:/) { $symbolicnamessection=1; @@ -80,6 +81,11 @@ while () { if ($id =~/(.*)RC(.*)/) { $version=$1; $rc=$2; + $version=~m#(\d+\.\d+)\.#; + if (versioncompare($version, $majorversion->{$1})) { + $majorversion->{$1}=$version; + $majorversionrc->{$1}=$rc; + } if (versioncompare($version, $highestversion)) { $highestversion=$version; $released=0; @@ -87,6 +93,11 @@ while () { } } else { $version=$id; + $version=~m#(\d+\.\d+)\.#; + if (versioncompare($version, $majorversion->{$1})) { + $majorversion->{$1}=$version; + $majorversionrc->{$1}=0; + } if (versioncompare($version, $highestversion)) { $highestversion=$version; $released=1; @@ -102,18 +113,33 @@ while () { my $releaseversion=''; my $currentversion=''; +my $branchdata=`grep buildrelease CVS/Entries`; +chomp $branchdata; +my $branch=(split(m#/#, $branchdata))[5]; + +if ($branch eq 'Trel-1-2') { + $highestversion=$majorversion->{'1.2'}; + $highestrc=$majorversionrc->{'1.2'}; + ($highestrc) ? ($released=0) : ($released=1); +} if ($released) { my @components=split(/\./, $highestversion); $components[$#components]++; $nexthighestversion=join '.', @components; - $releaseversion=$nexthighestversion."RC1"; + my $minornumber=(split(/\./, $highestversion))[1]; + if ($minornumber/2 == int($minornumber/2)) { + $releaseversion=$nexthighestversion."RC1"; + } else { + $releaseversion=$nexthighestversion; + } $currentversion=$highestversion; } else { $releaseversion=$highestversion."RC".($highestrc+1); $currentversion=$highestversion."RC$highestrc"; } + print "Current release tag is $currentversion.\n"; print "\nWould you like to bump that up to $releaseversion (or manually enter version)? [Y]/N: "; chomp($input = ); @@ -271,6 +297,7 @@ system("mv $rootdir/intranet-cgi/tkperl $rootdir/scripts"); system("mv $rootdir/intranet-cgi/translator $rootdir/scripts"); system("mv $rootdir/intranet-cgi/updater $rootdir/scripts"); system("mv $rootdir/intranet-cgi/misc $rootdir/scripts"); +system("mv $rootdir/intranet-cgi/marc $rootdir/scripts"); system("mv $rootdir/intranet-cgi/acqui.simple/bulkmarcimport.pl $rootdir/scripts/z3950daemon/"); system("mv $rootdir/intranet-cgi/acqui.simple/processz3950queue $rootdir/scripts/z3950daemon/"); system("mv $rootdir/intranet-cgi/acqui.simple/z3950-daemon-launch.sh $rootdir/scripts/z3950daemon/"); diff --git a/koha.upgrade b/koha.upgrade index f29bbc01b1..fc60878ab0 100644 --- a/koha.upgrade +++ b/koha.upgrade @@ -140,7 +140,10 @@ Backed up: %6d items entries %6d borrowers +File Listing +--------------------------------------------------------------------- $filels +--------------------------------------------------------------------- Does this look right? ([Y]/N): |, $bibliocounter, $biblioitemcounter, $itemcounter, $membercounter; diff --git a/moredetail.pl b/moredetail.pl index 4d4a0b44a2..6aa19034a4 100755 --- a/moredetail.pl +++ b/moredetail.pl @@ -90,7 +90,7 @@ foreach my $item (@items){ } } -$template->param(includesdir => $includes); +#$template->param(includesdir => $includes); $template->param(BIBITEM_DATA => \@results); $template->param(ITEM_DATA => \@items); $template->param(loggedinuser => $loggedinuser); -- 2.39.5