Files
rpm-packaging/tools/run_renderspec.sh
Dirk Mueller 1c3582f898 Fix linters gate
It seems the sed wasn't reliable. renderspec has an option to disable
the double expand, let's make use of it rather than hackling around
afterwards.

Change-Id: I2f877657ad39f02396e9f70fb500a3a5dd376679
2017-10-11 23:03:02 +02:00

35 lines
889 B
Bash
Executable File

#!/bin/bash
set -eux
basedir=${1:-$PWD}
specdir=${basedir}/openstack/
WORKSPACE=${WORKSPACE:-$basedir}
OUTPUTDIR=$WORKSPACE/logs/
specstyles="suse fedora"
MAXPROC=4
# clean up output dir
for specstyle in $specstyles; do
mkdir -p $OUTPUTDIR/${specstyle}/
rm -rf $OUTPUTDIR/${specstyle}/*
done
count=0
echo "run renderspec over specfiles from ${specdir}"
for specstyle in $specstyles; do
for spec in ${specdir}/**/*.spec.j2; do
echo "run ${spec} for ${specstyle}"
pkg_name=$(pymod2pkg --dist $specstyle $(basename $spec .spec.j2))
renderspec --spec-style ${specstyle} ${spec} \
--requirements $basedir/global-requirements.txt \
--skip-pyversion py3 \
-o $WORKSPACE/logs/${specstyle}/$pkg_name.spec &
let count+=1
[[ count -eq $MAXPROC ]] && wait && count=0
done
done
wait