3
6
if [ "$1" = "" ]; then
4
7
echo "Please provide version string, eg: 1.2.0"
8
if [ ! -d "lib/talloc" ]; then
11
if [ ! -d "lib/${LNAME}" ]; then
9
12
echo "Run this script from the samba base directory."
13
# Check exports and signatures are up to date
15
./script/abi_checks.sh talloc talloc.h
18
if [ ! "$abicheck" = "0" ]; then
19
echo "ERROR: ABI Checks produced warnings!"
23
git clean -f -x -d lib/talloc
24
git clean -f -x -d lib/replace
26
16
curbranch=`git branch |grep "^*" | tr -d "* "`
29
19
strver=`echo ${version} | tr "." "-"`
31
21
# Checkout the release tag
32
git branch -f talloc-release-script-${strver} talloc-${strver}
22
git branch -f ${LNAME}-release-script-${strver} ${LNAME}-${strver}
33
23
if [ ! "$?" = "0" ]; then
34
echo "Unable to checkout talloc-${strver} release"
24
echo "Unable to checkout ${LNAME}-${strver} release"
38
git checkout talloc-release-script-${strver}
30
git checkout $curbranch
31
git branch -d ${LNAME}-release-script-${strver}
35
# NOTE: use cleanquit after this point
36
git checkout ${LNAME}-release-script-${strver}
40
38
# Test configure agrees with us
41
confver=`grep "^AC_INIT" lib/talloc/configure.ac | tr -d "AC_INIT(talloc, " | tr -d ")"`
39
confver=`grep "^AC_INIT" lib/${LNAME}/configure.ac | tr -d "AC_INIT(${LNAME}, " | tr -d ")"`
42
40
if [ ! "$confver" = "$version" ]; then
43
41
echo "Wrong version, requested release for ${version}, found ${confver}"
45
# Check exports and signatures are up to date
47
./script/abi_checks.sh ${LNAME} ${LINCLUDE}
50
if [ ! "$abicheck" = "0" ]; then
51
echo "ERROR: ABI Checks produced warnings!"
55
git clean -f -x -d lib/${LNAME}
56
git clean -f -x -d lib/replace
47
58
# Now build tarball
48
cp -a lib/talloc talloc-${version}
49
cp -a lib/replace talloc-${version}/libreplace
50
pushd talloc-${version}
59
cp -a lib/${LNAME} ${LNAME}-${version}
60
cp -a lib/replace ${LNAME}-${version}/libreplace
61
pushd ${LNAME}-${version}
53
tar cvzf talloc-${version}.tar.gz talloc-${version}
54
rm -fr talloc-${version}
57
git checkout $curbranch
58
git branch -d talloc-release-script-${strver}
64
tar cvzf ${LNAME}-${version}.tar.gz ${LNAME}-${version}
65
rm -fr ${LNAME}-${version}