From d00bfd84437917355b00ac4400ee044b276e2e63 Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Mon, 5 Nov 2001 09:14:19 +0000 Subject: [PATCH] Add nightly build script. svn path=/trunk/yasm/; revision=323 --- Mkfiles/nightly-build.pl | 42 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 Mkfiles/nightly-build.pl diff --git a/Mkfiles/nightly-build.pl b/Mkfiles/nightly-build.pl new file mode 100644 index 00000000..832011b5 --- /dev/null +++ b/Mkfiles/nightly-build.pl @@ -0,0 +1,42 @@ +#!/usr/bin/perl +# $IdPath$ +use POSIX qw(strftime); + +$|++; + +my $version = '0.0.1'; +my $todaydate = strftime "%Y%m%d", localtime; +my $snapshot_dir = "/home/yasm/public_html/snapshots/$todaydate"; +my $cvs_dir = '/usr/local/cvs2/yasm/chrooted-cvs/cvs'; +my $build_dir = '/home/yasm/build'; + +# Create snapshot directory +system('mkdir', $snapshot_dir); + +# Build CVS tree tarball +chdir("$cvs_dir/..") || die "Could not change to CVS directory"; +system('tar', '-czf', "$snapshot_dir/yasm-cvstree.tar.gz", 'cvs') == 0 + or die "CVS tree tarball build failed: $?."; + +# Build CVS checkout tarball +chdir($build_dir) || die "Could not change to build directory"; +system('rm', '-Rf', 'yasm') == 0 + or die "Could not remove old CVS checkout directory: $?."; +system('mkdir', 'yasm') == 0 + or die "Could not create CVS checkout directory: $?."; +chdir('yasm') || die "Could not change to CVS checkout directory."; +system('cvs', '-q', "-d$cvs_dir", 'checkout', '.') == 0 + or die "CVS checkout failed: $?."; +chdir('..'); +system('tar', '-czf', "$snapshot_dir/yasm-cvs.tar.gz", 'yasm') == 0 + or die "CVS checkout tarball build failed: $?."; +chdir('yasm'); + +# Update and build distribution tarball +system("./autogen.sh >$snapshot_dir/autogen-log.txt") == 0 + or die "autogen.sh failed: $?."; +system("gmake distcheck >$snapshot_dir/make-log.txt") == 0 + or die "build failed: $?."; +system("cp *.tar.gz $snapshot_dir/") == 0 + or die "dist tarball copy failed."; + -- 2.40.0