#!/bin/bash

set -e

if [[ $TRAVIS_TAG == v* ]] && [ "$TRAVIS_OS_NAME" = "linux" ]; then
	# Let's create release for vX tags only.
	# Strip the v from the TRAVIS_TAG for our prefix and output items
	REL_TAG=`echo $TRAVIS_TAG | sed -e 's/^v//'`
	git archive --prefix rdma-core-$REL_TAG/ --output rdma-core-$REL_TAG.tar.gz $TRAVIS_TAG
fi
