Make idl2wrs dissectors filterable - Part 1
[metze/wireshark/wip.git] / tools / git-compare-abis.sh
1 #!/bin/bash
2
3 # $Id$
4
5 # check if Wireshark's ABI has been changes since last release (tag)
6 set -e
7
8 if test -z "$1"; then
9         echo "Usage:"
10         echo "$0 \"<build commands>\""
11         echo "e.g. $0 \"./autogen.sh && ./configure && make -j3 && make dumpabi\""
12         exit 1
13 fi
14
15 # build current version
16 bash -c "$1"
17
18 cd `git rev-parse --show-toplevel`
19 # we are at top level
20
21 # Stable branches with releases
22 #LAST_TAG=`git describe --tags --abbrev=0`
23 #LAST_TAG_DIR=$LAST_TAG
24
25 # Use latest commit
26 LAST_TAG=HEAD
27 LAST_TAG_DIR=master
28
29 rm -rf $LAST_TAG_DIR
30 mkdir $LAST_TAG_DIR
31 git archive $LAST_TAG | tar -x -C $LAST_TAG_DIR
32
33 # build latest tag
34 (cd $LAST_TAG_DIR && bash -c "$1")
35
36 exec tools/compare-abis.sh `pwd`/$LAST_TAG_DIR `pwd`
37