head	1.18;
access;
symbols
	Release_0_2_0:1.7
	Branch_0_2:1.7.0.2
	last-ALSA-MIDI:1.4;
locks; strict;
comment	@# @;


1.18
date	2007.06.25.10.47.02;	author larsl;	state Exp;
branches;
next	1.17;
commitid	AYNkRdqReQV9zhns;

1.17
date	2007.06.25.10.39.28;	author larsl;	state Exp;
branches;
next	1.16;
commitid	m0b8Ww6vMDVywhns;

1.16
date	2007.06.25.10.39.02;	author larsl;	state Exp;
branches;
next	1.15;
commitid	uiRThmzYYLApwhns;

1.15
date	2007.06.25.10.38.49;	author larsl;	state Exp;
branches;
next	1.14;
commitid	XCvdhTfuhD7lwhns;

1.14
date	2007.06.25.10.36.52;	author larsl;	state Exp;
branches;
next	1.13;
commitid	cHwFu99M4uWFvhns;

1.13
date	2007.06.25.10.36.19;	author larsl;	state Exp;
branches;
next	1.12;
commitid	VH3EEcskH0auvhns;

1.12
date	2007.06.25.10.35.20;	author larsl;	state Exp;
branches;
next	1.11;
commitid	b0OrmiZeirl9vhns;

1.11
date	2007.06.25.10.34.01;	author larsl;	state Exp;
branches;
next	1.10;
commitid	0untklM7ar7Huhns;

1.10
date	2006.05.29.11.50.18;	author larsl;	state Exp;
branches;
next	1.9;

1.9
date	2006.05.12.21.59.00;	author larsl;	state Exp;
branches;
next	1.8;

1.8
date	2006.05.06.14.25.37;	author larsl;	state Exp;
branches;
next	1.7;

1.7
date	2006.05.04.01.11.58;	author larsl;	state Exp;
branches
	1.7.2.1;
next	1.6;

1.6
date	2006.04.30.15.57.21;	author larsl;	state Exp;
branches;
next	1.5;

1.5
date	2005.07.01.14.33.02;	author larsl;	state Exp;
branches;
next	1.4;

1.4
date	2005.05.11.11.36.17;	author larsl;	state Exp;
branches;
next	1.3;

1.3
date	2005.05.04.13.44.49;	author larsl;	state Exp;
branches;
next	1.2;

1.2
date	2005.05.04.13.35.44;	author larsl;	state Exp;
branches;
next	1.1;

1.1
date	2005.05.04.12.28.33;	author larsl;	state Exp;
branches;
next	;

1.7.2.1
date	2006.05.16.23.08.10;	author larsl;	state dead;
branches;
next	;


desc
@@


1.18
log
@Fixed a bug in dcvs
@
text
@#!/usr/bin/perl

# change these parameters if you are using this script for your own project
my $project = "dino";
my $module = "dino";
my $user = "larsl";
my $module_dir = "/cvsroot/$project/$module";

# make sure that this is a commit
$is_commit = 0;
foreach (@@ARGV) {
  if ($_ eq 'ci' || $_ eq 'commit') {
    $is_commit = 1;
    last;
  }
}
if ($is_commit == 0) {
  print "This is not a CVS commit!\n";
  exit;
}


# modify the version in the makefile
system 'cp Makefile Makefile.bak';
open MAKEFILE_BAK, "<Makefile.bak";
open MAKEFILE, ">Makefile";
my $version = "";
while (<MAKEFILE_BAK>) {
  if (/PACKAGE_VERSION\ =\ ([0-9]+)\.([0-9]+)\.(-?[0-9]+)/) {
    $old_version = "$1.$2.$3";
    $version = "$1.$2." . ($3 + 1);
    print MAKEFILE "PACKAGE_VERSION = $version\n";
    print "Updating version to $version\n";
  }
  else {
    print MAKEFILE $_;
  }
}
close MAKEFILE_BAK;
close MAKEFILE;


# find out which files have changed
@@files = ();
$nfiles = 0;
@@lines = `(cvs diff -u | grep "RCS file") 2> /dev/null`;
foreach $line (@@lines) {
  if ($line =~ /^RCS file: $module_dir\/(.*),v$/) {
    $files[$nfiles++] = $1;
  }
}


# if the CVS command fails, copy the backup back in place
if (system('cvs', @@ARGV) != 0) {
  system 'cp Makefile.bak Makefile';
  exit;
}


# The code below is adapted from Petr Baudis's ciabot_cvs.pl


# Get log message
$next = 0;
foreach $arg (@@ARGV) {
  if ($next == 1) {
    $logmsg = "$version: $arg";
    break;
  }
  if ($arg eq "-m") {
    $next = 1;
  }
}


# Compose the RPC message
my $ts = time;

$message = <<EM
<message>
   <generator>
       <name>dcvs</name>
       <version>$version</version>
   </generator>
   <source>
       <project>$project</project>
       <module>$module</module>
   </source>
   <timestamp>
       $ts
   </timestamp>
   <body>
       <commit>
           <author>$user</author>
           <files>
EM
;

foreach $file (@@files) {
  $message .= "              <file>$file</file>\n";
}

$message .= <<EM
           </files>
           <log>
$logmsg
           </log>
       </commit>
   </body>
</message>
EM
;


### Send out the XML-RPC message


# We gotta be careful from now on. We silence all the warnings because
# RPC::XML code is crappy and works with undefs etc.
$^W = 0;
$RPC::XML::ERROR if (0); # silence perl's compile-time warning

require RPC::XML;
require RPC::XML::Client;

my $rpc_client = new RPC::XML::Client 'http://cia.vc/RPC2';
my $rpc_request = RPC::XML::request->new('hub.deliver', $message);
my $rpc_response = $rpc_client->send_request($rpc_request);

unless (ref $rpc_response) {
  die "XML-RPC Error: $RPC::XML::ERROR\n";
}


@


1.17
log
@Added the new improved dcvs to the Dino repository as well
@
text
@d7 1
a7 1

d44 1
a44 1
@@files = {};
d48 1
a48 1
  if ($line =~ /^RCS file: \/sources\/dino\/dino\/(.*),v$/) {
a49 1
    print "Added $1\n";
d61 3
a76 3
# The code below is adapted from Petr Baudis's ciabot_cvs.pl


a115 5
print $message;


exit;

@


1.16
log
@Added the new improved dcvs to the Dino repository as well
@
text
@d48 1
a48 1
  if ($line =~ /^RCS file: \/sources\/${project}\/${module}\/(.*),v$/) {
@


1.15
log
@Added the new improved dcvs to the Dino repository as well
@
text
@d44 1
a44 1
#@@files = {};
@


1.14
log
@Added the new improved dcvs to the Dino repository as well
@
text
@d48 1
a48 1
  if ($line =~ /^RCS file: \/sources\/$project\/$module\/(.*),v$/) {
@


1.13
log
@Added the new improved dcvs to the Dino repository as well
@
text
@d44 1
a44 1
@@files = {};
@


1.12
log
@Added the new improved dcvs to the Dino repository as well
@
text
@d50 1
@


1.11
log
@Added the new improved dcvs to the Dino repository as well
@
text
@d116 5
@


1.10
log
@Added bbt_offset support in the sequencer, indented sequencer.cpp, removed the automatic tarball generation and uploading from the dcvs script
@
text
@d3 7
d22 2
d27 1
d31 3
a33 3
    $new_version = "$1.$2." . ($3 + 1);
    print MAKEFILE "PACKAGE_VERSION = $new_version\n";
    print "Updating version to $new_version\n";
d43 12
d57 76
@


1.9
log
@Added new build system, committed all other changes done during the SF blackout (mostly plugin architecture changes)
@
text
@a35 21
else {
  if ((system 'make dist > /dev/null && echo put dino-' . $new_version .
       '.tar.bz2 | ' .
       'sftp larsl@@shell1.sf.net:/home/groups/d/di/dinoseq/htdocs/snapshot/' .
       ' > /dev/null') != 0) {
    printf "Could not upload snapshot!\n";
  }
  else {
    if ((system 'ssh larsl@@shell1.sourceforge.net "echo ' . $new_version .
	 ' > /home/groups/d/di/dinoseq/htdocs/development_version"') != 0) {
      printf "Could not update the development version on the webpage!\n";
    }
    else {
      if ((system 'ssh larsl@@shell1.sf.net rm -f ' .
    	   '/home/groups/d/di/dinoseq/htdocs/snapshot/dino-' . $old_version .
    	   '.tar.bz2') != 0) {
    	printf "Could not remove old snapshot!\n";
      }
    }
  }
}
@


1.8
log
@Uncommented the snapshot removing code in dcvs, changed the version to 0.3.1
@
text
@d15 5
a19 5
system 'cp configure.ac configure.ac.bak';
open CONFIGURE_AC_BAK, "<configure.ac.bak";
open CONFIGURE_AC, ">configure.ac";
while (<CONFIGURE_AC_BAK>) {
  if (/AC_INIT\(dino, ([0-9]+)\.([0-9]+)\.(-?[0-9]+)\)/) {
d22 1
a22 1
    print CONFIGURE_AC "AC_INIT(dino, $new_version)\n";
d26 1
a26 1
    print CONFIGURE_AC $_;
d29 2
a30 2
close CONFIGURE_AC_BAK;
close CONFIGURE_AC;
d34 1
a34 1
  system 'cp configure.ac.bak configure.ac';
d38 1
a38 1
       '.tar.gz | ' .
d51 1
a51 1
    	   '.tar.gz') != 0) {
@


1.7
log
@Removed the MIDIEvent class
@
text
@d48 7
a54 7
    #else {
    #  if ((system 'ssh larsl@@shell1.sf.net rm -f ' .
    #	   '/home/groups/d/di/dinoseq/htdocs/snapshot/dino-' . $old_version .
    #	   '.tar.gz') != 0) {
    #	printf "Could not remove old snapshot!\n";
    #  }
    #}
@


1.7.2.1
log
@Bumped JACK requirement to 0.102.5, added an <cassert> in noteevent.hpp, fixed embarrassing timestamping bug
@
text
@@


1.6
log
@Added '#include <cassert>' in pattern.hpp to fix build problem on some platforms, reported by 'ii' on #lad, commented out the part of the dcvs script that removes old snapshots to avoid confusing people who try to download beta versions
@
text
@d19 1
a19 1
  if (/AC_INIT\(dino, ([0-9]+)\.([0-9]+)\.([0-9]+)\)/) {
d32 1
@


1.5
log
@Fixed the dcvs script so it doesn't change the snapshot links until the new snapshot is uploaded
@
text
@d47 7
a53 7
    else {
      if ((system 'ssh larsl@@shell1.sf.net rm -f ' .
	   '/home/groups/d/di/dinoseq/htdocs/snapshot/dino-' . $old_version .
	   '.tar.gz') != 0) {
	printf "Could not remove old snapshot!\n";
      }
    }
@


1.4
log
@The CVS script should now upload a snapshot to the website
@
text
@d36 5
a40 3
  if ((system 'ssh larsl@@shell1.sourceforge.net "echo ' . $new_version .
       ' > /home/groups/d/di/dinoseq/htdocs/development_version"') != 0) {
    printf "Could not update the development version on the webpage!\n";
d43 3
a45 5
    if ((system 'make dist > /dev/null && echo put dino-' . $new_version .
	 '.tar.gz | ' .
	 'sftp larsl@@shell1.sf.net:/home/groups/d/di/dinoseq/htdocs/snapshot/' .
	 ' > /dev/null') != 0) {
      printf "Could not upload snapshot!\n";
d57 1
@


1.3
log
@Last change to the CVS script (I hope)
@
text
@d20 1
d40 15
@


1.2
log
@Updated the CVS script
@
text
@d35 4
a38 2
  system 'ssh larsl@@shell1.sourceforge.net "echo ' . $new_version .
    ' > /home/groups/d/di/dinoseq/htdocs/development_version"';
@


1.1
log
@Added script that updates the patch level automatically when changes are committed
@
text
@d20 3
a22 2
    print CONFIGURE_AC "AC_INIT(dino, $1.$2." . ($3 + 1) . ")\n";
    print "Updating version to $1.$2." . ($3 + 1) . "\n";
d28 2
d31 7
a37 1
exec 'cvs', @@ARGV;
@

