aboutsummaryrefslogtreecommitdiffstats
path: root/dist
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2016-05-03 04:38:58 +0200
committerTristan Gingold <tgingold@free.fr>2016-05-03 04:38:58 +0200
commit3f7c49e755b05334373bbf1ba847469640098008 (patch)
tree49399d0758f17c08af898e246f8b36fa3f60ae8e /dist
parent09bb764984bd1039ba7bf4eb32d9ae693f02036c (diff)
downloadghdl-3f7c49e755b05334373bbf1ba847469640098008.tar.gz
ghdl-3f7c49e755b05334373bbf1ba847469640098008.tar.bz2
ghdl-3f7c49e755b05334373bbf1ba847469640098008.zip
travis-ci: create a tarball for the build.
Diffstat (limited to 'dist')
-rwxr-xr-xdist/travis-ci.sh21
1 files changed, 16 insertions, 5 deletions
diff --git a/dist/travis-ci.sh b/dist/travis-ci.sh
index d0f356b8e..cf7e81916 100755
--- a/dist/travis-ci.sh
+++ b/dist/travis-ci.sh
@@ -5,15 +5,16 @@
set -e
CDIR=$PWD
+BLD=$1
# Prepare
-prefix="$CDIR/install-$1"
+prefix="$CDIR/install-$BLD"
mkdir "$prefix"
-mkdir build-$1
-cd build-$1
+mkdir build-$BLD
+cd build-$BLD
# Configure
-case "$1" in
+case "$BLD" in
mcode)
../configure --prefix="$prefix" ;;
@@ -21,7 +22,7 @@ case "$1" in
../configure --prefix="$prefix" --with-llvm-config=llvm-config-3.5 ;;
*)
- echo "unknown build $1"
+ echo "unknown build $BLD"
exit 1
;;
esac
@@ -31,6 +32,16 @@ make
make install
cd ..
+# Package
+PKG_VER=`grep Ghdl_Ver src/version.ads | sed -e 's/.*"\(.*\)";/\1/'`
+
+if [ "$TRAVIS_TAG" = "x" ]; then
+ PKG_TAG=`date -u +%Y%m%d`
+else
+ PKG_TAG=$TRAVIS_TAG
+fi
+tar -zcvf ghdl-$PKG_VER-$BLD-$PKG_TAG.tgz -C $prefix .
+
# Test
export GHDL="$CDIR/install-$1/bin/ghdl"
cd testsuite