pungi-fedora/nightly.sh

37 lines
905 B
Bash
Raw Normal View History

#!/bin/sh
export LC_ALL=C
CONFIG="fedora.conf"
TARGET_DIR="/mnt/koji/compose/rawhide"
#OLD_COMPOSES_DIR="--old-composes=/mnt/fedora_koji/compose/f23 --old-composes=$TARGET_DIR"
NIGHTLY="--nightly"
SKIP_PHASES="--skip-phase=productimg"
DEST=$(pwd)
DATE=$(date "+%Y%m%d")
COMPSFILE="comps-f24.xml"
TMPDIR=`mktemp -d /tmp/f24.$DATE.XXXX`
# uncomment and edit for resuming a failed compose
#COMPOSE_ID="Fedora-23-20150530.n.0"
pushd $TMPDIR
git clone https://git.fedorahosted.org/git/comps.git && {
pushd comps
make "${COMPSFILE}"
cp "${COMPSFILE}" $DEST/
popd
}
popd
CMD="pungi-koji --notification-script=/usr/bin/pungi-fedmsg-notification --config=$CONFIG --old-composes=$TARGET_DIR $OLD_COMPOSES_DIR $NIGHTLY $SKIP_PHASES"
if [ -z "$COMPOSE_ID" ]; then
CMD="$CMD --target-dir=$TARGET_DIR"
else
CMD="$CMD --debug-mode --compose-dir=$TARGET_DIR/$COMPOSE_ID"
fi
time $CMD "$@"