|
|
| version 1.1.1.1, 2012/02/17 15:09:30 | version 1.1.1.2, 2016/11/01 09:54:32 |
|---|---|
| Line 16 use Date::Format; | Line 16 use Date::Format; |
| # Where the local copy of /home/ftp/pub/rsync/dev/nightly should be updated. | # Where the local copy of /home/ftp/pub/rsync/dev/nightly should be updated. |
| our $dest = $ENV{HOME} . '/samba-rsync-ftp/dev/nightly'; | our $dest = $ENV{HOME} . '/samba-rsync-ftp/dev/nightly'; |
| our $samba_host = $ENV{SAMBA_HOST} || 'samba.org'; | |
| our $nightly_symlink = "$dest/rsync-HEAD.tar.gz"; | our $nightly_symlink = "$dest/rsync-HEAD.tar.gz"; |
| our($make_tar, $upload, $help_opt); | our($make_tar, $upload, $help_opt); |
| Line 39 if ($make_tar) { | Line 40 if ($make_tar) { |
| open(IN, '-|', 'git status') or die $!; | open(IN, '-|', 'git status') or die $!; |
| my $status = join('', <IN>); | my $status = join('', <IN>); |
| close IN; | close IN; |
| die "The checkout is not clean:\n", $status unless $status =~ /\nnothing to commit \(working directory clean\)/; | die "The checkout is not clean:\n", $status unless $status =~ /\nnothing to commit.+working directory clean/; |
| die "The checkout is not on the master branch.\n" unless $status =~ /^# On branch master\n/; | die "The checkout is not on the master branch.\n" unless $status =~ /^(?:# )?On branch master\n/; |
| system "make $gen_target" and die "make $gen_target failed!\n"; | system "make $gen_target" and die "make $gen_target failed!\n"; |
| my @extra_files; | my @extra_files; |
| Line 59 if ($make_tar) { | Line 60 if ($make_tar) { |
| my $confversion; | my $confversion; |
| open(IN, '<', 'configure.ac') or die "Unable to open configure.ac: $!\n"; | open(IN, '<', 'configure.ac') or die "Unable to open configure.ac: $!\n"; |
| while (<IN>) { | while (<IN>) { |
| if (/^RSYNC_VERSION=(.*)/) { | if (/^AC_INIT\(\[rsync\],\s*\[(\d.+?)\]/) { |
| $confversion = $1; | $confversion = $1; |
| last; | last; |
| } | } |
| } | } |
| close IN; | close IN; |
| die "Unable to find RSYNC_VERSION in configure.ac\n" unless defined $confversion; | die "Unable to find AC_INIT with version in configure.ac\n" unless defined $confversion; |
| open(IN, '<', 'OLDNEWS') or die "Unable to open OLDNEWS: $!\n"; | open(IN, '<', 'OLDNEWS') or die "Unable to open OLDNEWS: $!\n"; |
| $_ = <IN>; | $_ = <IN>; |
| Line 156 if ($upload) { | Line 157 if ($upload) { |
| if (defined $ENV{RSYNC_PARTIAL_DIR}) { | if (defined $ENV{RSYNC_PARTIAL_DIR}) { |
| $opt = " -f 'R $ENV{RSYNC_PARTIAL_DIR}'"; | $opt = " -f 'R $ENV{RSYNC_PARTIAL_DIR}'"; |
| } | } |
| system "rsync$opt -aviHP --delete-after . samba.org:/home/ftp/pub/rsync/dev/nightly"; | system "rsync$opt -aviHP --delete-after . $samba_host\:/home/ftp/pub/rsync/dev/nightly"; |
| } | } |
| exit; | exit; |