aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaúl Porcel <armin76@gentoo.org>2013-08-14 17:40:22 +0000
committerRaúl Porcel <armin76@gentoo.org>2013-08-14 17:40:22 +0000
commit5c3f1d90364d8f77ded92736ae3c0021f2df0e0c (patch)
tree72954b3d74da84e9cef2fccd28b9b2ab3bb7f9be /tools/catalyst-auto-alpha.conf
parentRemove apostrophes (diff)
downloadreleng-5c3f1d90364d8f77ded92736ae3c0021f2df0e0c.tar.gz
releng-5c3f1d90364d8f77ded92736ae3c0021f2df0e0c.tar.bz2
releng-5c3f1d90364d8f77ded92736ae3c0021f2df0e0c.zip
Use latest logic for stage1 seed, hppa and ppc need some work as they have all the stages in the same dir
Diffstat (limited to 'tools/catalyst-auto-alpha.conf')
-rw-r--r--tools/catalyst-auto-alpha.conf29
1 files changed, 27 insertions, 2 deletions
diff --git a/tools/catalyst-auto-alpha.conf b/tools/catalyst-auto-alpha.conf
index 09d45fe7..fd600f16 100644
--- a/tools/catalyst-auto-alpha.conf
+++ b/tools/catalyst-auto-alpha.conf
@@ -21,11 +21,36 @@ EMAIL_SUBJECT_PREPEND="[alpha-auto]"
CATALYST_CONFIG=/etc/catalyst/catalyst.conf
+BUILD_SRCDIR_BASE=`grep storedir= $CATALYST_CONFIG | cut -d '=' -f2 | sed -e 's/"//g'`
+
+give_latest_from_dates() {
+ sed 's,-20,~20,g' | \
+ sort -k +1 -n -t '~' |\
+ awk -F\~ \
+ 'BEGIN{i=$1; o=$0};
+ { if($1 != i && i != "") { print o; }; i=$1; o=$0; }
+ END { print o; };' | \
+ tr '~' '-'
+}
+
+
pre_build() {
cd ${GITDIR}
git pull
+
+ # Symlink the latest stages3 to build from
+ for d in ${BUILD_SRCDIR_BASE}/builds/default ; do
+ pushd $d
+ for f in $(ls stage3*bz2 | give_latest_from_dates ) ; do
+ of=${f/20[0-9][0-9].[0-9]/latest} # for 20XX.Y stuff
+ of=${of/20[0-9][0-9][0-1][0-9][0-9][0-9]/latest} # for $
+ ln -sf $f $of
+
+ done
+ popd
+ done
}
-
+
post_build() {
- rsync -e 'ssh -i /home/armin76/buildsync.key' /space/catalyst/builds/default/stage3-*${DATESTAMP}*.bz2* /space/catalyst/builds/default/*${DATESTAMP}*.iso* alpha@skimmer.gentoo.org:
+ rsync -e 'ssh -i /home/armin76/buildsync.key' ${BUILD_SRCDIR_BASE}/builds/default/stage3-*${DATESTAMP}*.bz2* ${BUILD_SRCDIR_BASE}/builds/default/*${DATESTAMP}*.iso* alpha@skimmer.gentoo.org:
}