
* Making sure the sed call captures the versions that pbr outputs Change-Id: Idfdf8394e1920f73688e547a5bd8bcf3e591d675
14 lines
389 B
Bash
Executable File
14 lines
389 B
Bash
Executable File
#!/bin/bash
|
|
|
|
pushd $PWD
|
|
mkdir -p rpmbuild/{BUILD,RPMS,S{OURCE,PEC,RPM}S}
|
|
|
|
BUILD_VERSION=$(ls dist | sed 's/^barbican-\(.*\)\.tar\.gz/\1/g')
|
|
export BUILD_VERSION
|
|
echo "Building RPM version $BUILD_VERSION"
|
|
|
|
cp "dist/barbican-$BUILD_VERSION.tar.gz" rpmbuild/SOURCES
|
|
sed -e s/BUILD_VERSION/$BUILD_VERSION/g -i rpmbuild/SPECS/barbican.spec
|
|
rpmbuild -ba --sign rpmbuild/SPECS/barbican.spec
|
|
popd
|