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

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)
