echo "In manual mode you should export the following vars (or use related option)"
echo "MAJOR_DISTROS (-d) TRUNK_DISTROS (-td) VS_DISTROS (-vd)"
echo "FCDISTROS (-f) BITS (-i) BASE (-b)"
+ echo "BUILD_BRANCH (-bb) BUILD_TRUNK (-bt)"
echo "RETRY (-O) TEST (-T) DRY_RUN (-n)"
echo "Use at least one space for blanking a set of distros"
exit 1
}
+function run () {
+ [ -n "$manual" ] && echo "$@" '; \'
+ if [ -z "$DRY_RUN" ] ; then
+ "$@"
+ fi
+}
+
+function shortname () {
+ distro=$1; shift
+ case $distro in
+ onelab) echo 1l;;
+ planetlab) echo pl;;
+ *) echo xx;;
+ esac
+}
+
# comment off for usual dailies
MAJOR=4.2
MINOR=rc18
-td) shift; TRUNK_DISTROS="$1" ;;
-vd) shift; VS_DISTROS="$1" ;;
-b) shift; BASE="$1" ;;
+ -bb) BUILD_BRANCH=true ;;
+ -bt) BUILD_TRUNK=true ;;
-O) RETRY=true ;;
-T) TEST=true ;;
-n) DRY_RUN=true ;;
DEFAULT_BITS="32 64"
DEFAULT_BASE="@DATE@"
-if [ -z "$MINOR" ] ; then
+function trunk_builds () {
DEFAULT_MAJOR_DISTROS=""
DEFAULT_VS_DISTROS=""
# 5.0 ready for planetlab distro only so far
DEFAULT_TRUNK_DISTROS="planetlab"
# DEFAULT_TRUNK_DISTROS="onelab planetlab"
- BUILDOPT=""
-else
+}
+
+function branch_builds () {
+ DEFAULT_MAJOR_DISTROS="onelab planetlab"
+ DEFAULT_VS_DISTROS=""
+ DEFAULT_BITS="32"
+ DEFAULT_TRUNK_DISTROS=""
+}
+
+function tagged_builds () {
DEFAULT_MAJOR_DISTROS="onelab planetlab"
DEFAULT_VS_DISTROS="onelab"
DEFAULT_TRUNK_DISTROS=""
+}
+
+if [ -n "$BUILD_BRANCH" ] ; then
+ branch_builds
+ BUILDOPT="-s http://svn.planet-lab.org/svn/build/branches/${MAJOR}"
+elif [ -n "$BUILD_TRUNK" ] ; then
+ trunk_builds
+ BUILDOPT=""
+else
+ tagged_builds
BUILDOPT="-s http://svn.planet-lab.org/svn/build/tags/${MAJOR}-${MINOR}"
fi
-
-
[[ -n "$@" ]] && usage
# export any of these to override - this is for manual use only
[ -n "$TEST" ] && { extra_option="$extra_option -T" ; manual=true ; }
[ -n "$DRY_RUN" ] && { manual=true ; }
-function run () {
- [ -n "$manual" ] && echo "$@" '; \'
- if [ -z "$DRY_RUN" ] ; then
- "$@"
- fi
-}
-
-function shortname () {
- distro=$1; shift
- case $distro in
- onelab) echo 1l;;
- planetlab) echo pl;;
- *) echo xx;;
- esac
-}
-
############################## ${MAJOR}
for bits in $BITS; do
for f in $FCDISTROS ; do
for d in $MAJOR_DISTROS ; do
p=linux${bits}
s=$(shortname $d)
- if [ -z "$MINOR" ] ; then
+ if [ -n "$BUILD_BRANCH" ] ; then
+ buildname="${d}-${MAJOR}-@DATE@.1lab-${f}-${bits}"
+ elif [ -n "$BUILD_TRUNK" ] ; then
buildname="${BASE}--${s}.${MAJOR}--${f}-${bits}"
else
buildname="${d}-${MAJOR}-${MINOR}.1lab-${f}-${bits}"
for bits in $BITS ; do
p=linux${bits}
s=$(shortname $d)
- if [ -z "$MINOR" ] ; then
+ if [ -n "$BUILD_BRANCH" ] ; then
+ buildname="${d}-${MAJOR}-@DATE@.1lab-${f}-${bits}"
+ elif [ -n "$BUILD_TRUNK" ] ; then
buildname="${BASE}--${s}.${MAJOR}--${f}-${bits}"
else
buildname="${d}-${MAJOR}-${MINOR}.1lab-${f}-${bits}"