#!/bin/sh
VERSION=0.$(git log -1 --date="format:%Y%m%d" --pretty="format:%cd")
VERSION="1.0.0+git$(git log -1 --date='format:%Y%m%d' --pretty='format:%cd')"
VERSION="1.4.0"

echo "creating ../horizon-eda-${VERSION}.tar.xz"
tar -C .. -cJ --exclude=debian --exclude=horizon-eda-${VERSION}.tar.xz --exclude-vcs --exclude-vcs-ignore --transform="s/horizon/horizon-eda-${VERSION}/" -f ../horizon-eda-${VERSION}.tar.xz horizon
(cd ..; ln -s horizon-eda-${VERSION}.tar.xz horizon-eda_${VERSION}.orig.tar.xz)
