source: trunk/server/lib/tdb/script/release-script.sh

Last change on this file was 987, checked in by Silvan Scherrer, 9 years ago

samba server: fix crlf in tdb trunk code

File size: 1.5 KB
Line 
1#!/bin/bash
2
3LNAME=tdb
4LINCLUDE=include/tdb.h
5
6if [ "$1" = "" ]; then
7 echo "Please provide version string, eg: 1.2.0"
8 exit 1
9fi
10
11if [ ! -d "lib/${LNAME}" ]; then
12 echo "Run this script from the samba base directory."
13 exit 1
14fi
15
16curbranch=`git branch |grep "^*" | tr -d "* "`
17
18version=$1
19strver=`echo ${version} | tr "." "-"`
20
21# Checkout the release tag
22git branch -f ${LNAME}-release-script-${strver} ${LNAME}-${strver}
23if [ ! "$?" = "0" ]; then
24 echo "Unable to checkout ${LNAME}-${strver} release"
25 exit 1
26fi
27
28function cleanquit {
29 #Clean up
30 git checkout $curbranch
31 git branch -d ${LNAME}-release-script-${strver}
32 exit $1
33}
34
35# NOTE: use cleanquit after this point
36git checkout ${LNAME}-release-script-${strver}
37
38# Test configure agrees with us
39confver=`grep "^AC_INIT" lib/${LNAME}/configure.ac | tr -d "AC_INIT(${LNAME}, " | tr -d ")"`
40if [ ! "$confver" = "$version" ]; then
41 echo "Wrong version, requested release for ${version}, found ${confver}"
42 exit 1
43fi
44
45# Check exports and signatures are up to date
46pushd lib/${LNAME}
47./script/abi_checks.sh ${LNAME} ${LINCLUDE}
48abicheck=$?
49popd
50if [ ! "$abicheck" = "0" ]; then
51 echo "ERROR: ABI Checks produced warnings!"
52 cleanquit 1
53fi
54
55git clean -f -x -d lib/${LNAME}
56git clean -f -x -d lib/replace
57
58# Now build tarball
59cp -a lib/${LNAME} ${LNAME}-${version}
60cp -a lib/replace ${LNAME}-${version}/libreplace
61pushd ${LNAME}-${version}
62./autogen.sh
63popd
64tar cvzf ${LNAME}-${version}.tar.gz ${LNAME}-${version}
65rm -fr ${LNAME}-${version}
66
67cleanquit 0
Note: See TracBrowser for help on using the repository browser.