]> granicus.if.org Git - docbook-dsssl/commitdiff
Allow the version to be specified
authorNorman Walsh <ndw@nwalsh.com>
Thu, 14 Jun 2001 18:35:32 +0000 (18:35 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Thu, 14 Jun 2001 18:35:32 +0000 (18:35 +0000)
cvstools/nextversion

index 98f759bd59a3df3eb53af01e3eedccccb5af7cfc..fa24971cb50e0dbdac7c4992c04744fdd456d57a 100755 (executable)
@@ -1,9 +1,16 @@
 #!/usr/bin/perl -- # --*-Perl-*--
 
 use strict;
+use Getopt::Std;
+use vars qw($opt_v);
 
 select STDOUT; $| = 1;
 
+my $usage = "Usage: $0 [-v version]\n";
+
+die $usage if ! getopts('v:');
+my $version = $opt_v || undef;
+
 my @cvsbad = `cvs -n update 2>&1 | grep -v ^cvs`;
 if (@cvsbad) {
     print STDERR @cvsbad;
@@ -29,16 +36,19 @@ my $post = $4;
 
 $minor++;
 
-print "About to release $major.$minor; are you sure? ";
+$version = "$major.$minor" if !$version;
+
+print "About to release $version; are you sure? ";
 chop($_ = scalar(<>));
 
 die "Aborted!\n" if !/^y/i;
 
 open (F, ">VERSION");
-print F "$pre$major.$minor$post";
+print F "$pre$version$post";
 close (F);
 
-system ("cvs commit -m \"Version $major.$minor released.\" VERSION");
-system ("cvs tag V$major$minor");
+system ("cvs commit -m \"Version $version released.\" VERSION");
 
+$version =~ s/\.//g;
 
+system ("cvs tag V$version");