2008-01-17 22:31:02 +03:00
|
|
|
PRODUCT = $(shell grep "^product[ \t]" bootstrap.cfg | sed -e 's/[^=]*= *//')
|
|
|
|
VERSION = $(shell grep "^version[ \t]" bootstrap.cfg | sed -e 's/[^=]*= *//')
|
|
|
|
OLD_VERSION = $(shell grep "^oldVersion[ \t]" bootstrap.cfg | sed -e 's/[^=]*= *//')
|
|
|
|
PRODUCT_TAG = $(shell grep "^productTag[ \t]" bootstrap.cfg | sed -e 's/[^=]*= *//')
|
|
|
|
# extract the numeric rc value from the config file
|
|
|
|
PRODUCT_RC = $(shell grep "^rc[ \t]" bootstrap.cfg | sed -e 's/[^0-9]*\([0-9]*\).*/\1/')
|
|
|
|
|
2006-12-05 22:58:38 +03:00
|
|
|
test:
|
2008-01-31 02:16:30 +03:00
|
|
|
for f in release t/test.pl `find . -name "*.pm"`; do \
|
|
|
|
perl -c $$f || exit $?; done
|
2007-02-01 06:50:47 +03:00
|
|
|
if [ -f t/test.log ]; then rm t/test.log; fi
|
2007-03-26 03:54:25 +04:00
|
|
|
if [ ! -f bootstrap.cfg ]; then cp bootstrap.cfg.example bootstrap.cfg; fi
|
2007-10-02 03:41:04 +04:00
|
|
|
cp t/tinder-config.pl.orig t/tinder-config.pl
|
2006-12-05 22:58:38 +03:00
|
|
|
./t/test.pl
|
|
|
|
|
|
|
|
stage:
|
|
|
|
# basic environment
|
2007-04-25 02:04:12 +04:00
|
|
|
mkdir -p /builds/config
|
2006-12-05 22:58:38 +03:00
|
|
|
mkdir -p /builds/tags
|
|
|
|
mkdir -p /builds/updates/
|
|
|
|
mkdir -p /builds/verify/
|
2007-08-15 22:46:22 +04:00
|
|
|
mkdir -p /builds/logs/
|
2007-09-25 02:24:51 +04:00
|
|
|
mkdir -p /data/symbols/
|
2007-03-23 02:01:14 +03:00
|
|
|
# fake key
|
2008-01-17 22:31:02 +03:00
|
|
|
mkdir -p /home/ftp/pub/${PRODUCT}/releases/1.5/
|
|
|
|
touch /home/ftp/pub/${PRODUCT}/releases/1.5/KEY
|
2007-08-15 22:46:22 +04:00
|
|
|
# ftp
|
2008-01-17 22:31:02 +03:00
|
|
|
mkdir -p /home/ftp/pub/${PRODUCT}/nightly
|
|
|
|
chown -R cltbld:${PRODUCT} /home/ftp/pub/${PRODUCT}
|
|
|
|
chmod -R g+rwxs /home/ftp/pub/${PRODUCT}
|
2007-08-15 22:46:22 +04:00
|
|
|
chmod -R o+rx /home/ftp/pub
|
2006-12-05 22:58:38 +03:00
|
|
|
# staging environment
|
2008-01-17 22:31:02 +03:00
|
|
|
mkdir -p /data/cltbld/${PRODUCT}-${VERSION}/batch1/stage
|
|
|
|
# download old builds, for l10n verify
|
2008-01-22 20:32:33 +03:00
|
|
|
cd /data && wget -nv --cut-dirs=3 -np -r ftp://ftp.mozilla.org/pub/mozilla.org/${PRODUCT}/nightly/${OLD_VERSION}-candidates/rc1/* && mv ftp.mozilla.org/nightly/* /home/ftp/pub/${PRODUCT}/nightly/ && rm -rfv ftp.mozilla.org
|
2008-01-17 22:31:02 +03:00
|
|
|
# download old release, for update verify
|
|
|
|
cd /data && wget -nv --cut-dirs=3 -np -r -e robots=off http://releases.mozilla.org/pub/mozilla.org/${PRODUCT}/releases/${OLD_VERSION}/ && mv releases.mozilla.org/releases/* /home/ftp/pub/${PRODUCT}/releases/ && rm -rfv releases.mozilla.org
|
2007-12-11 23:08:24 +03:00
|
|
|
|
2006-12-05 22:58:38 +03:00
|
|
|
|
2007-02-01 06:50:47 +03:00
|
|
|
cvsmirror: cvsmirror_mofo cvsmirror_main
|
2006-12-05 22:58:38 +03:00
|
|
|
|
|
|
|
cvsmirror_main:
|
2007-08-15 22:46:22 +04:00
|
|
|
rsync -a --delete-after --exclude=CVSROOT/config --exclude=CVSROOT/loginfo cvs-mirror.mozilla.org::mozilla/ /builds/cvsmirror.clean/cvsroot/
|
|
|
|
rsync -a --delete-after cvs-mirror.mozilla.org::l10n/ /builds/cvsmirror.clean/l10n/
|
|
|
|
chgrp -R cvs /builds/cvsmirror.clean/cvsroot /builds/cvsmirror.clean/l10n
|
|
|
|
chmod -R g+rw /builds/cvsmirror.clean/cvsroot /builds/cvsmirror.clean/l10n
|
2008-01-17 22:31:02 +03:00
|
|
|
cvs -d /builds/cvsmirror.clean/cvsroot rtag -d ${PRODUCT_TAG}_RELEASE mozilla
|
|
|
|
cvs -d /builds/cvsmirror.clean/cvsroot rtag -d ${PRODUCT_TAG}_RELEASE_l10n mozilla/tools/tinderbox-configs/
|
|
|
|
for ((rc=1; rc <= ${PRODUCT_RC}; rc++)); do \
|
|
|
|
cvs -d /builds/cvsmirror.clean/cvsroot rtag -d ${PRODUCT_TAG}_RC$$rc mozilla;\
|
|
|
|
cvs -d /builds/cvsmirror.clean/cvsroot rtag -d ${PRODUCT_TAG}_RC$$rc_l10n mozilla/tools/tinderbox-configs/;\
|
|
|
|
cvs -d /builds/cvsmirror.clean/l10n rtag -d ${PRODUCT_TAG}_RC$$rc l10n;\
|
|
|
|
cvs -d /builds/cvsmirror.clean/l10n rtag -d ${PRODUCT_TAG}_RC$$rc l10n;\
|
|
|
|
done
|
2006-12-05 22:58:38 +03:00
|
|
|
|
|
|
|
cvsmirror_mofo:
|
2007-08-15 22:46:22 +04:00
|
|
|
mkdir -p /builds/cvsmirror.clean/tmp/mofo
|
|
|
|
mkdir -p /builds/cvsmirror.clean/mofo
|
|
|
|
cvs -d /builds/cvsmirror.clean/mofo init
|
|
|
|
cd /builds/cvsmirror.clean/tmp/mofo && cvs -d cltbld@cvs.mozilla.org:/mofo export -r MOZILLA_1_8_BRANCH talkback
|
|
|
|
cd /builds/cvsmirror.clean/tmp/mofo && cvs -d cltbld@cvs.mozilla.org:/mofo export -r HEAD release
|
2007-08-16 06:01:48 +04:00
|
|
|
cd /builds/cvsmirror.clean/tmp/mofo/release && cvs -d /builds/cvsmirror.clean/mofo import -d -m "import CVS snapshot" release MOZILLA_1_8_BRANCH_release R0_1
|
|
|
|
cd /builds/cvsmirror.clean/tmp/mofo/talkback && cvs -d /builds/cvsmirror.clean/mofo import -d -m "import CVS snapshot" talkback MOZILLA_1_8_BRANCH R0_1
|
2007-08-15 22:46:22 +04:00
|
|
|
rm -rf /builds/cvsmirror.clean/tmp/mofo
|
|
|
|
chgrp -R cvs /builds/cvsmirror.clean/mofo
|
|
|
|
chmod g+rwx /builds/cvsmirror.clean/mofo
|
|
|
|
chmod -R g+rw /builds/cvsmirror.clean/mofo
|
2007-03-23 02:01:14 +03:00
|
|
|
|
2007-08-15 22:46:22 +04:00
|
|
|
clean_stage: clean_logs
|
2007-04-25 02:04:12 +04:00
|
|
|
rm -rf /builds/config/*
|
2006-12-05 22:58:38 +03:00
|
|
|
rm -rf /builds/tags/*
|
|
|
|
rm -rf /builds/release/logs/*
|
|
|
|
rm -rf /builds/updates/*
|
|
|
|
rm -rf /builds/verify/*
|
2008-01-17 22:31:02 +03:00
|
|
|
rm -rf /data/cltbld/${PRODUCT}-*/
|
|
|
|
rm -rf /home/ftp/pub/${PRODUCT}/*
|
2006-12-05 22:58:38 +03:00
|
|
|
|
2007-03-22 01:44:17 +03:00
|
|
|
clean_cvsmirror: clean_cvsmirror_main clean_cvsmirror_mofo
|
2007-08-15 22:46:22 +04:00
|
|
|
rm -rf /builds/cvsmirror.clean/*
|
2007-03-22 01:44:17 +03:00
|
|
|
|
|
|
|
clean_cvsmirror_main:
|
2007-08-15 22:46:22 +04:00
|
|
|
rm -rf /builds/cvsmirror.clean/cvsroot/*
|
|
|
|
rm -rf /builds/cvsmirror.clean/l10n/*
|
2007-03-22 01:44:17 +03:00
|
|
|
|
|
|
|
clean_cvsmirror_mofo:
|
2007-08-15 22:46:22 +04:00
|
|
|
rm -rf /builds/cvsmirror.clean/mofo/*
|
|
|
|
|
|
|
|
clean_logs:
|
|
|
|
rm -rf /builds/logs/*
|
|
|
|
|