2012-05-05 23:24:46 -04:00
|
|
|
#!/bin/sh
|
2012-03-23 23:44:21 -04:00
|
|
|
##### -*- mode:shell-script; indent-tabs-mode:nil; sh-basic-offset:2 -*-
|
|
|
|
|
2012-05-05 22:58:16 -04:00
|
|
|
sdir="."
|
|
|
|
[ -n "${0%/*}" ] && sdir="${0%/*}"
|
|
|
|
. $sdir/common.sh
|
2012-03-23 23:44:21 -04:00
|
|
|
|
2012-05-07 16:56:45 -04:00
|
|
|
check_pwd
|
2015-02-09 13:19:31 -05:00
|
|
|
version=`cat build/next-release.txt`
|
2015-02-12 15:48:59 -05:00
|
|
|
if [ $# -gt 0 ]; then
|
|
|
|
version="$version.$1"
|
|
|
|
fi
|
2015-02-09 13:19:31 -05:00
|
|
|
eval $(parse_version "$version")
|
2012-11-30 12:19:32 -05:00
|
|
|
if [ -n "$grev" ]; then
|
|
|
|
dst_name="freeswitch-$cmajor.$cminor.$cmicro.$grev"
|
|
|
|
else
|
|
|
|
dst_name="freeswitch-$cmajor.$cminor.$cmicro"
|
|
|
|
fi
|
2015-02-12 15:48:59 -05:00
|
|
|
check_input_ver_build $version
|
2012-04-19 22:38:46 -04:00
|
|
|
|
2015-02-09 13:19:31 -05:00
|
|
|
#This should be a RAM Drive
|
2015-02-10 11:30:06 -05:00
|
|
|
build_dir="jenkins.$$"
|
|
|
|
dst_dir="${tmp_dir}/${build_dir}/$dst_name"
|
2012-03-23 23:44:21 -04:00
|
|
|
|
|
|
|
if [ -d "$dst_dir" ]; then
|
|
|
|
echo "error: destination directory $dst_dir already exists." 1>&2
|
|
|
|
exit 1;
|
|
|
|
fi
|
|
|
|
|
|
|
|
mkdir -p $dst_dir
|
|
|
|
cp -r . $dst_dir
|
|
|
|
|
|
|
|
cd $dst_dir
|
2012-05-08 11:54:33 -04:00
|
|
|
set_fs_ver "$gver" "$gmajor" "$gminor" "$gmicro" "$grev"
|
2012-06-11 17:25:05 -04:00
|
|
|
echo "$gver" > .version
|
2012-05-06 01:26:56 -04:00
|
|
|
gnuize
|
2012-03-23 23:44:21 -04:00
|
|
|
cd ..
|
|
|
|
ls
|
2012-05-05 21:52:50 -04:00
|
|
|
tar -cvf ${dst_name}.tar $dst_name
|
2012-03-23 23:44:21 -04:00
|
|
|
|
2014-02-03 21:29:30 -05:00
|
|
|
gzip -9 -c ${dst_name}.tar > $dst_name.tar.gz || echo "gzip not available"
|
2012-05-05 21:52:50 -04:00
|
|
|
bzip2 -z -k ${dst_name}.tar || echo "bzip2 not available"
|
2014-02-03 21:29:30 -05:00
|
|
|
xz -z -9 -k ${dst_name}.tar || echo "xz / xz-utils not available"
|
|
|
|
zip -r $dst_name.zip $dst_name
|
2012-03-23 23:44:21 -04:00
|
|
|
|
2015-02-10 11:30:06 -05:00
|
|
|
mkdir -p ${src_repo}/../src_dist
|
|
|
|
mv -f ${dst_name}.tar.* ${src_repo}/../src_dist
|
|
|
|
mv -f $dst_name.zip ${src_repo}/../src_dist
|
2015-02-12 15:48:59 -05:00
|
|
|
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
|
2015-02-10 11:30:06 -05:00
|
|
|
|
|
|
|
cd ${tmp_dir}
|
|
|
|
ls -al
|
|
|
|
rm -rf ${build_dir}
|
|
|
|
ls -al
|
2012-03-23 23:44:21 -04:00
|
|
|
|
|
|
|
cat 1>&2 <<EOF
|
|
|
|
----------------------------------------------------------------------
|
2012-05-06 01:26:56 -04:00
|
|
|
The freeswitch-${cver} tarballs have been rolled,
|
2012-03-23 23:44:21 -04:00
|
|
|
now we just need to roll packages with them
|
|
|
|
----------------------------------------------------------------------
|
|
|
|
EOF
|
|
|
|
|