aboutsummaryrefslogtreecommitdiffstats
path: root/testing/scripts
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2015-11-06 11:19:22 +0100
committerTobias Brunner <tobias@strongswan.org>2015-11-09 15:18:37 +0100
commitaee35392d1a8b2d9082c429bc3a6f618f7d926fa (patch)
treefb9c604fa6f2297f99ef70c1842f8f80f78801d3 /testing/scripts
parentd4908c06c1254228e383ecb91aaf336129f063c0 (diff)
downloadstrongswan-aee35392d1a8b2d9082c429bc3a6f618f7d926fa.tar.bz2
strongswan-aee35392d1a8b2d9082c429bc3a6f618f7d926fa.tar.xz
testing: Record strongSwan version when building from source tree
Diffstat (limited to 'testing/scripts')
-rwxr-xr-xtesting/scripts/build-strongswan11
1 files changed, 11 insertions, 0 deletions
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'