From aee35392d1a8b2d9082c429bc3a6f618f7d926fa Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Fri, 6 Nov 2015 11:19:22 +0100 Subject: testing: Record strongSwan version when building from source tree --- testing/scripts/build-strongswan | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'testing') diff --git a/testing/scripts/build-strongswan b/testing/scripts/build-strongswan index b68d3cd68..8c6ecaafd 100755 --- a/testing/scripts/build-strongswan +++ b/testing/scripts/build-strongswan @@ -53,6 +53,17 @@ log_action "Remove SWID tags of previous versions" execute_chroot 'find /usr/local/share/regid.2004-03.org.strongswan -name *.swidtag -delete' echo "Building and installing strongSwan" + +log_action "Determine strongSwan version" +desc=`git -C $SWANDIR describe --dirty` +if [ $? -eq 0 ]; then + SWANVERSION="$desc (`git -C $SWANDIR rev-parse --abbrev-ref HEAD`)" +else + SWANVERSION="`cat $SWANDIR/configure.ac | sed -n '/^AC_INIT/{ s/.*,\[\(.*\)\])$/\1/p }'`" +fi +echo "$SWANVERSION" > $SHAREDDIR/.strongswan-version +log_status 0 + log_action "Preparing source tree" execute_chroot 'autoreconf -i /root/strongswan' -- cgit v1.2.3