add build script for the project

add build script for nova-zvm-virt-driver to build rpm packages
with using speciifed version format.

Change-Id: I8322d2cf134b996689f092b1e7a0a3693f506421
This commit is contained in:
Huang Rui 2015-04-20 13:35:20 +08:00
parent edf132802a
commit 827ca80582

16
tools/build_rpm.sh Executable file
View File

@ -0,0 +1,16 @@
#! /bin/sh
export PBR_VERSION="2015.1"
if [ $# == 0 ]; then
echo "You should provide project top dir."
read TOP_DIR
fi
TOP_DIR=${TOP_DIR:-$1}
RELEASE=`date "+%Y%m%d"`
cd ${TOP_DIR}
rm -f ${TOP_DIR}/dist/*
python setup.py bdist_rpm --release ${RELEASE}