#!/bin/sh
set -e
NAME=rpmlint-tests
VERSION=13.2
scmver=`git log -n1 --date=short --pretty=format:"git%cd.%h"|sed 's@-@@g'`
#LAST_COMMIT=(`git rev-list --timestamp HEAD^..HEAD`)
#DATE=`date +$datefmt -d "1970-01-01 00:00 UTC $LAST_COMMIT seconds"`
#scmver="$DATE"
fullver="$VERSION${scmver:++}$scmver"
pfx="$NAME${fullver:+-$fullver}"
fn="$pfx".tar.xz
if ! git config --get tar.umask >/dev/null 2>&1 ; then
	git config --add tar.umask 022
fi
git archive --prefix="$pfx"/ HEAD | xz > $fn
echo "VERSION=$fullver"
echo "FILENAME=$fn"
