Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 50 lines (39 sloc) 1.512 kb
cf9b6a4b »
2006-09-03 add tool to auto-build interim releases from svn
1 #!/usr/bin/perl
2
3 use strict;
4 use FindBin qw($Bin);
5
6 my %branch = (
7 '1.2.x' => "http://code.sixapart.com/svn/memcached/trunk/server",
8 '1.1.x' => "http://code.sixapart.com/svn/memcached/branches/memcached-1.1.x",
9 );
10
11 foreach my $b (keys %branch) {
12 chdir $Bin or die;
13 my $url = $branch{$b};
14 my $out = `svn info $b`;
15 unless ($out =~ /^URL: (.+)/m && $1 eq $url) {
16 system("rm -rf $b");
17 system("svn", "co", $url, $b)
18 and die "Failed to checkout $url\n";
19 } else {
20 chdir "$Bin/$b" or die;
21 system("svn up") and die "Failed to svn up";
22 }
23
24 chdir "$Bin/$b" or die;
25 $out = `svn info .`;
26
27 my ($maxrev) = $out =~ /^Last Changed Rev: (\d+)/m
28 or die "No max rev?";
29
30 print "$b = $maxrev\n";
31 my $distfile = "memcached-$b-svn$maxrev.tar.gz";
32 next if -f $distfile && -s _;
33
34 open(my $fh, "configure.ac") or die "no configure.ac in $b?";
35 my $ac = do { local $/; <$fh>; };
36 close($fh);
37 $ac =~ s!AC_INIT\(memcached,.+?\)!AC_INIT(memcached, $b-svn$maxrev, brad\@danga.com)!
38 or die "Failed to replace";
39 open (my $fh, ">configure.ac") or die "failed to write configure.ac writeable: $!";
40 print $fh $ac;
41 close ($fh);
42
43 system("./autogen.sh") and die "Autogen failed. Missing autotools?";
44 system("./configure") and die "configure failed";
45 system("make dist") and die "make dist failed";
46 die "Failed to make dist $distfile." unless -s $distfile;
47 }
48
49
Something went wrong with that request. Please try again.