ci: add support for more flexible version numbers

This commit is contained in:
Travis Cross
2012-05-06 01:12:08 +00:00
parent 02c0637c0c
commit 2769fc6585
4 changed files with 43 additions and 12 deletions

View File

@@ -7,7 +7,8 @@ sdir="."
eval $(parse_version "$1")
dst_name="freeswitch-$major.$minor.$micro"
dst_name="freeswitch-$ver"
dst_cname="freeswitch-$cmajor.$cminor.$cmicro"
dst_parent="${tmp_dir}/jenkis.$$/"
dst_dir="${tmp_dir}/jenkins.$$/$dst_name"
@@ -24,7 +25,7 @@ cd $dst_dir
sed -e "s|\(AC_SUBST(SWITCH_VERSION_MAJOR, \[\).*\(\])\)|\1$major\2|" \
-e "s|\(AC_SUBST(SWITCH_VERSION_MINOR, \[\).*\(\])\)|\1$minor\2|" \
-e "s|\(AC_SUBST(SWITCH_VERSION_MICRO, \[\).*\(\])\)|\1$micro\2|" \
-e "s|\(AC_INIT(\[freeswitch\], \[\).*\(\], BUG-REPORT-ADDRESS)\)|\1$major.$minor.$micro\2|" \
-e "s|\(AC_INIT(\[freeswitch\], \[\).*\(\], BUG-REPORT-ADDRESS)\)|\1$ver\2|" \
-i configure.in
if [ -n "$rev" ]; then
@@ -49,12 +50,14 @@ tar -cvf ${dst_name}.tar $dst_name
# gzip -9 -c ${dst_name}.tar > $dst_name.tar.gz || echo "gzip not available"
bzip2 -z -k ${dst_name}.tar || echo "bzip2 not available"
cp -al ${dst_name}.tar.bz2 ${dst_cname}.tar.bz2
# xz -z -9 -k ${dst_name}.tar || echo "xz / xz-utils not available"
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_cname}.tar.* ${src_repo}/src_dist
cat 1>&2 <<EOF
----------------------------------------------------------------------