summaryrefslogtreecommitdiff
path: root/devtools
diff options
context:
space:
mode:
authorBrad Fitzpatrick <brad@danga.com>2006-09-03 20:26:43 +0000
committerBrad Fitzpatrick <brad@danga.com>2006-09-03 20:26:43 +0000
commit148b7d02eb312139e40f3853b0cdefc87389ca79 (patch)
tree70c388b2379ece938b7127684223e86304129664 /devtools
parent6bb2424052aa49ddd27bae9b63d2d07ebf4f3633 (diff)
downloadmemcached-148b7d02eb312139e40f3853b0cdefc87389ca79.tar.gz
add tool to auto-build interim releases from svn
git-svn-id: http://code.sixapart.com/svn/memcached/trunk/server@323 b0b603af-a30f-0410-a34e-baf09ae79d0b
Diffstat (limited to 'devtools')
-rwxr-xr-xdevtools/svn-tarballs.pl49
1 files changed, 49 insertions, 0 deletions
diff --git a/devtools/svn-tarballs.pl b/devtools/svn-tarballs.pl
new file mode 100755
index 0000000..ccac9a3
--- /dev/null
+++ b/devtools/svn-tarballs.pl
@@ -0,0 +1,49 @@
+#!/usr/bin/perl
+
+use strict;
+use FindBin qw($Bin);
+
+my %branch = (
+ '1.2.x' => "http://code.sixapart.com/svn/memcached/trunk/server",
+ '1.1.x' => "http://code.sixapart.com/svn/memcached/branches/memcached-1.1.x",
+ );
+
+foreach my $b (keys %branch) {
+ chdir $Bin or die;
+ my $url = $branch{$b};
+ my $out = `svn info $b`;
+ unless ($out =~ /^URL: (.+)/m && $1 eq $url) {
+ system("rm -rf $b");
+ system("svn", "co", $url, $b)
+ and die "Failed to checkout $url\n";
+ } else {
+ chdir "$Bin/$b" or die;
+ system("svn up") and die "Failed to svn up";
+ }
+
+ chdir "$Bin/$b" or die;
+ $out = `svn info .`;
+
+ my ($maxrev) = $out =~ /^Last Changed Rev: (\d+)/m
+ or die "No max rev?";
+
+ print "$b = $maxrev\n";
+ my $distfile = "memcached-$b-svn$maxrev.tar.gz";
+ next if -f $distfile && -s _;
+
+ open(my $fh, "configure.ac") or die "no configure.ac in $b?";
+ my $ac = do { local $/; <$fh>; };
+ close($fh);
+ $ac =~ s!AC_INIT\(memcached,.+?\)!AC_INIT(memcached, $b-svn$maxrev, brad\@danga.com)!
+ or die "Failed to replace";
+ open (my $fh, ">configure.ac") or die "failed to write configure.ac writeable: $!";
+ print $fh $ac;
+ close ($fh);
+
+ system("./autogen.sh") and die "Autogen failed. Missing autotools?";
+ system("./configure") and die "configure failed";
+ system("make dist") and die "make dist failed";
+ die "Failed to make dist $distfile." unless -s $distfile;
+}
+
+