Skip to content
Snippets Groups Projects
Commit a6d3a6691452 authored by justdave's avatar justdave
Browse files

Adding additional files required for the current version of the build system

parent 0f512edd95ca
No related branches found
No related tags found
No related merge requests found
cd /data/build/seamonkeyproject-org && \
cvs -q up -dAP > /dev/null || exit 1
rm -f dest &&
ttree -f etc/ttree.cfg $@
rsync -a --delete dest/ /data/static/www/www.seamonkeyproject.org/
rm -rf dest && \
ln -s /data/static/www/www.seamonkeyproject.org dest
#!/usr/bin/perl -w
# Builds the website, acquiring a lock first so builds don't collide with
# each other. Run this from the website root directory. Pass command line
# options to the build script by first putting "--" on the command line,
# i.e. "build-exclusive.pl -- -v foo.html" runs "bin/build -v foo.html".
use strict;
# The number of seconds to wait before trying again if another build is going.
# Set this with the --wait command line option.
my $WAIT = 15;
# The maximum amount of time in seconds to wait for a lock before dying.
# Set this with the --maxwait command line option.
#
# If this script is being run periodically by cron, set this low (ideally less
# than the interval between cron runs; f.e. 30 seconds for a run that happens
# every minute) to prevent processes from building up.
#
# If this script gets run by CVS upon commit, set this high (f.e. 450 seconds,
# i.e. 15 minutes) so that multiple simultaneous commits all go through
# one after the other even if some of them have to wait a while.
#
my $MAX_WAIT = 30;
# Get any options passed on the command line, like --wait and --maxwait.
use Getopt::Long;
my $result = GetOptions ("wait=i" => \$WAIT,
"maxwait=i" => \$MAX_WAIT);
# Use Proc::PID::File to handle the locking.
use Proc::PID::File;
my $LOCK_OPTS = {
dir => "/tmp",
name => "smprojorg-build",
debug => 0
};
# Try to get a lock.
my $started = time();
my $waited = 0;
while (Proc::PID::File->running($LOCK_OPTS) && ((time()-$started)<=$MAX_WAIT)) {
print STDERR "Couldn't get build lock; waiting another $WAIT seconds...\n";
$waited = 1;
sleep $WAIT ;
}
# Die if we couldn't get a lock.
if (Proc::PID::File->running($LOCK_OPTS)) {
die "Couldn't get build lock.";
}
elsif ($waited) {
print STDERR "Got build lock after " . (time() - $started) . " seconds.\n";
}
# Build the website.
#print STDERR "Building site.\n";
system("bin/build_full", @ARGV);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment