2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-10-20 14:45:45 +00:00
Files
Markus Hilger f25d121fc5 Version the Python package rpms with ~dev as well
confluent_client and confluent_server rpms took the PEP 440 version
setup.py needs, 4.0.1.dev5+g..., which rpm sorts after 4.0.1: a
released package did not upgrade a development build of it. Stamp the
rpm with the ~dev form the other packages already use and keep .dev only
for setup.py and the sdist name. The debs already sort right, since
stdeb rewrites .dev to ~dev.
2026-10-15 19:20:16 +02:00

23 lines
751 B
Bash
Executable File

#!/bin/sh
cd `dirname $0`
if [ -x ./makeman ]; then
./makeman
fi
./makesetup > /dev/null || exit 1
# setup.py needs the PEP 440 .dev form, the rpm the ~dev one, which sorts
# before the release it leads up to
VERSION=`../mkversion --tilde` || exit 1
PKGNAME=$(basename $(pwd))
python3 setup.py sdist > /dev/null 2>&1
cp dist/*.tar.gz ~/rpmbuild/SOURCES
sed -e 's/#VERSION#/'$VERSION/ $PKGNAME.spec.tmpl > ~/rpmbuild/SPECS/$PKGNAME.spec
rpmbuild -ba ~/rpmbuild/SPECS/$PKGNAME.spec 2> /dev/null |grep ^Wrote:
if [ $? -ne 0 ]; then
echo "[ERROR] rpmbuild returned non-zero, run: rpmbuild -ba ~/rpmbuild/SPECS/$PKGNAME.spec"
exit 1
else
# Clean up the generated files in this directory
rm -rf $PKGNAME.egg-info dist setup.py
fi
exit 0