Merge "Clean up output dir before creating new renderspecs"

This commit is contained in:
Jenkins 2016-06-24 12:29:14 +00:00 committed by Gerrit Code Review
commit ed53256d13

@ -6,11 +6,19 @@ basedir=$1
specdir=${basedir}/openstack/
WORKSPACE=${WORKSPACE:-$basedir}
OUTPUTDIR=$WORKSPACE/logs/
specstyles="suse fedora"
mkdir -p $OUTPUTDIR
# clean up output dir
for specstyle in $specstyles; do
rm -f $OUTPUTDIR/*.${specstyle}
done
echo "run renderspec over specfiles from ${specdir}"
for spec in ${specdir}/**/*.spec.j2; do
mkdir -p $WORKSPACE/logs/
for specstyle in "suse" "fedora"; do
for specstyle in $specstyles; do
echo "run ${spec} for ${specstyle}"
renderspec --spec-style ${specstyle} ${spec} \
-o $WORKSPACE/logs/${spec##*/}.${specstyle}