FS-7273 Add support for build server to optionally specify revision when packaging RPM.

common.sh optionally accepts revision number and sets version in freeswitch-config-rayo.spec
	config-rayo.sh updated to be consistent with rpmbuilder.sh
        rpmbuilder.sh optionally accepts revision number
        src_tarball.sh will now produce freeswitch.spec and freeswitch-config-rayo.spec as artifacts.
This commit is contained in:
Chris Rienzo
2015-02-12 15:48:59 -05:00
parent 9593796420
commit 66486713b0
5 changed files with 79 additions and 19 deletions

View File

@@ -7,13 +7,16 @@ sdir="."
check_pwd
version=`cat build/next-release.txt`
check_input_ver_build $version
if [ $# -gt 0 ]; then
version="$version.$1"
fi
eval $(parse_version "$version")
if [ -n "$grev" ]; then
dst_name="freeswitch-$cmajor.$cminor.$cmicro.$grev"
else
dst_name="freeswitch-$cmajor.$cminor.$cmicro"
fi
check_input_ver_build $version
#This should be a RAM Drive
build_dir="jenkins.$$"
@@ -40,11 +43,13 @@ bzip2 -z -k ${dst_name}.tar || echo "bzip2 not available"
xz -z -9 -k ${dst_name}.tar || echo "xz / xz-utils not available"
zip -r $dst_name.zip $dst_name
rm -rf ${dst_name}.tar $dst_dir
mkdir -p ${src_repo}/../src_dist
mv -f ${dst_name}.tar.* ${src_repo}/../src_dist
mv -f $dst_name.zip ${src_repo}/../src_dist
cp -f ${dst_dir}/freeswitch.spec ${src_repo}/../src_dist
cp -f ${dst_dir}/freeswitch-config-rayo.spec ${src_repo}/../src_dist
rm -rf ${dst_name}.tar $dst_dir
cd ${tmp_dir}
ls -al