blob: bd63808810723d43dbc28f83c173d36a696a867d (
plain) (
tree)
|
|
#!/bin/bash
set -ex
version=$(sed -n 's/^Version: *\([0-9.]\+\)$/\1/p' < dist/fedora/pgbak.spec)
[[ -n "$version" ]]
if [[ -d "build" ]]; then
rm -r build
fi
mkdir build build/{src,rpms,srpms}
git archive --prefix="pgbak-$version/" HEAD > "build/src/pgbak-$version.tar.xz"
rpmbuild \
-D"_sourcedir $PWD/build/src" \
-D"_srcrpmdir $PWD/build/srpms" \
-D"_rpmdir $PWD/build/rpms" \
-ba dist/fedora/pgbak.spec
|